diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 5e72019219..73c4983414 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -185,6 +185,7 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SHEET* aSheet, bool aSaveUnderNewName ) screen->ClrSave(); screen->ClrModify(); + UpdateTitle(); msg.Printf( _( "File \"%s\" saved." ), screen->GetFileName() ); SetStatusText( msg, 0 ); diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index ae993049a4..5ae783f50e 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -549,6 +549,7 @@ void SYMBOL_EDIT_FRAME::Save() } m_treePane->GetLibTree()->RefreshLibTree(); + updateTitle(); } diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 5a07936aa7..17fade4172 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -1054,6 +1054,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory, GetScreen()->ClrModify(); GetScreen()->ClrSave(); + UpdateTitle(); return true; } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index bf1f7332c0..081d8f668d 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -284,7 +284,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, m_appearancePanel->ApplyLayerPreset( cfg->m_ActiveLayerPreset ); GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false ); - updateTitle(); + UpdateTitle(); setupUnits( GetSettings() ); // Default shutdown reason until a file is loaded @@ -737,11 +737,11 @@ void FOOTPRINT_EDIT_FRAME::OnModify() m_treePane->GetLibTree()->RefreshLibTree(); if( !GetTitle().StartsWith( "*" ) ) - updateTitle(); + UpdateTitle(); } -void FOOTPRINT_EDIT_FRAME::updateTitle() +void FOOTPRINT_EDIT_FRAME::UpdateTitle() { wxString title; LIB_ID fpid = GetLoadedFPID(); @@ -799,7 +799,7 @@ void FOOTPRINT_EDIT_FRAME::UpdateView() GetCanvas()->UpdateColors(); GetCanvas()->DisplayBoard( GetBoard() ); m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); - updateTitle(); + UpdateTitle(); } diff --git a/pcbnew/footprint_edit_frame.h b/pcbnew/footprint_edit_frame.h index 436c535e46..07b2d62408 100644 --- a/pcbnew/footprint_edit_frame.h +++ b/pcbnew/footprint_edit_frame.h @@ -305,6 +305,8 @@ public: ///< Reload displayed items and sets view. void UpdateView(); + void UpdateTitle(); + void FocusOnLibID( const LIB_ID& aLibID ); void KiwayMailIn( KIWAY_EXPRESS& mail ) override; @@ -325,11 +327,6 @@ protected: */ void initLibraryTree(); - /** - * Updates window title according to getLibNickName(). - */ - void updateTitle(); - void restoreLastFootprint(); void retainLastFootprint(); diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp index 01c1cfecad..47ae464b39 100644 --- a/pcbnew/footprint_editor_utils.cpp +++ b/pcbnew/footprint_editor_utils.cpp @@ -153,7 +153,7 @@ void FOOTPRINT_EDIT_FRAME::editFootprintProperties( FOOTPRINT* aFootprint ) m_treePane->GetLibTree()->RefreshLibTree(); } - updateTitle(); // in case of a name change... + UpdateTitle(); // in case of a name change... UpdateMsgPanel(); } diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index fa4131ca9c..96da61e971 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -1042,7 +1042,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintAs( FOOTPRINT* aFootprint ) wxString msg = wxString::Format( fmt, footprintName.GetData(), libraryName.GetData() ); SetStatusText( msg ); - updateTitle(); + UpdateTitle(); ReCreateHToolbar(); return true; diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index db6f573a4f..bcdc7818ae 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -252,6 +252,7 @@ int FOOTPRINT_EDITOR_CONTROL::Save( const TOOL_EVENT& aEvent ) canvas()->ForceRefresh(); m_frame->ClearModify(); + m_frame->UpdateTitle(); } }