Check for file moving directory and refresh entire tree if so.
Fixes: lp:1852431 * https://bugs.launchpad.net/kicad/+bug/1852431
This commit is contained in:
parent
f4a1fef3b0
commit
8ce04d3362
|
@ -699,8 +699,15 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& )
|
|||
if( buffer.IsEmpty() )
|
||||
return; // empty file name not allowed
|
||||
|
||||
wxString oldDir = tree_data->GetDir();
|
||||
|
||||
if( tree_data->Rename( buffer, true ) )
|
||||
m_TreeProject->SetItemText( curr_item, buffer );
|
||||
{
|
||||
if( tree_data->GetDir() != oldDir )
|
||||
ReCreateTreePrj();
|
||||
else
|
||||
m_TreeProject->SetItemText( curr_item, buffer );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue