diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index a7faeca0ea..7eb9d15905 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -170,7 +170,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ReCreateVToolbar(); ReCreateOptToolbar(); - updateTitle(); + UpdateTitle(); UpdateSymbolMsgPanelInfo(); RebuildSymbolUnitsList(); @@ -558,7 +558,7 @@ bool SYMBOL_EDIT_FRAME::CanCloseSymbolFromSchematic( bool doClose ) if( doClose ) { SetCurSymbol( nullptr, false ); - updateTitle(); + UpdateTitle(); } return true; @@ -849,7 +849,7 @@ void SYMBOL_EDIT_FRAME::OnModify() m_treePane->GetLibTree()->RefreshLibTree(); if( !GetTitle().StartsWith( "*" ) ) - updateTitle(); + UpdateTitle(); } @@ -1224,7 +1224,7 @@ void SYMBOL_EDIT_FRAME::ShowChangedLanguage() GetCanvas()->Refresh(); } - updateTitle(); + UpdateTitle(); } @@ -1518,7 +1518,7 @@ void SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic( SCH_SYMBOL* aSymbol ) OnToggleSymbolTree( evt ); } - updateTitle(); + UpdateTitle(); RebuildSymbolUnitsList(); SetShowDeMorgan( GetCurSymbol()->HasConversion() ); UpdateSymbolMsgPanelInfo(); diff --git a/eeschema/symbol_editor/symbol_edit_frame.h b/eeschema/symbol_editor/symbol_edit_frame.h index 71f5a0f44d..aa4f2ba3e5 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.h +++ b/eeschema/symbol_editor/symbol_edit_frame.h @@ -247,6 +247,12 @@ public: UpdateSymbolMsgPanelInfo(); } + /** + * Update the main window title bar with the current library name and read only status + * of the library. + */ + void UpdateTitle(); + bool IsSymbolFromSchematic() const { // If we've already vetted closing this window, then we have no symbol anymore @@ -427,12 +433,6 @@ private: */ bool saveLibrary( const wxString& aLibrary, bool aNewFile ); - /** - * Update the main window title bar with the current library name and read only status - * of the library. - */ - void updateTitle(); - /** * Set the current active library to \a aLibrary. * diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 50dc9ea973..eac4ae58c1 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -56,7 +56,7 @@ SYMBOL_SAVEAS_TYPE SYMBOL_LEGACYFILEDLG_SAVE_AS::m_option = SYMBOL_SAVEAS_TYPE:: #endif -void SYMBOL_EDIT_FRAME::updateTitle() +void SYMBOL_EDIT_FRAME::UpdateTitle() { wxString title; @@ -98,7 +98,7 @@ void SYMBOL_EDIT_FRAME::SelectActiveLibrary( const wxString& aLibrary ) if( !selectedLib.empty() ) SetCurLib( selectedLib ); - updateTitle(); + UpdateTitle(); } @@ -298,7 +298,7 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr GetInfoBar()->Dismiss(); } - updateTitle(); + UpdateTitle(); RebuildSymbolUnitsList(); SetShowDeMorgan( GetCurSymbol()->HasConversion() ); @@ -493,7 +493,7 @@ void SYMBOL_EDIT_FRAME::Save() if( IsSymbolTreeShown() ) m_treePane->GetLibTree()->RefreshLibTree(); - updateTitle(); + UpdateTitle(); } @@ -713,7 +713,7 @@ void SYMBOL_EDIT_FRAME::UpdateAfterSymbolProperties( wxString* aOldName ) RebuildSymbolUnitsList(); SetShowDeMorgan( GetCurSymbol()->Flatten()->HasConversion() ); - updateTitle(); + UpdateTitle(); // N.B. The view needs to be rebuilt first as the Symbol Properties change may invalidate // the view pointers by rebuilting the field table @@ -1217,7 +1217,7 @@ bool SYMBOL_EDIT_FRAME::saveAllLibraries( bool aRequireConfirmation ) } } - updateTitle(); + UpdateTitle(); return retv; } diff --git a/eeschema/symbol_editor/symbol_editor_undo_redo.cpp b/eeschema/symbol_editor/symbol_editor_undo_redo.cpp index 78ef608f9c..3c5f65c9ee 100644 --- a/eeschema/symbol_editor/symbol_editor_undo_redo.cpp +++ b/eeschema/symbol_editor/symbol_editor_undo_redo.cpp @@ -97,7 +97,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList() RebuildSymbolUnitsList(); SetShowDeMorgan( symbol->HasConversion() ); - updateTitle(); + UpdateTitle(); RebuildView(); OnModify(); @@ -145,7 +145,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList() RebuildSymbolUnitsList(); SetShowDeMorgan( symbol->HasConversion() ); - updateTitle(); + UpdateTitle(); RebuildView(); OnModify(); diff --git a/eeschema/tools/symbol_editor_control.cpp b/eeschema/tools/symbol_editor_control.cpp index 35bc6d3c48..32b533617e 100644 --- a/eeschema/tools/symbol_editor_control.cpp +++ b/eeschema/tools/symbol_editor_control.cpp @@ -377,6 +377,7 @@ int SYMBOL_EDITOR_CONTROL::RenameSymbol( const TOOL_EVENT& aEvent ) editFrame->RebuildView(); editFrame->OnModify(); + editFrame->UpdateTitle(); // N.B. The view needs to be rebuilt first as the Symbol Properties change may // invalidate the view pointers by rebuilting the field table