Update symbol editor's title bar when renaming the canvas symbol.
This commit is contained in:
parent
ee724f6a2b
commit
7d1dbb77c3
|
@ -171,7 +171,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
ReCreateVToolbar();
|
ReCreateVToolbar();
|
||||||
ReCreateOptToolbar();
|
ReCreateOptToolbar();
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
UpdateSymbolMsgPanelInfo();
|
UpdateSymbolMsgPanelInfo();
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ bool SYMBOL_EDIT_FRAME::CanCloseSymbolFromSchematic( bool doClose )
|
||||||
if( doClose )
|
if( doClose )
|
||||||
{
|
{
|
||||||
SetCurSymbol( nullptr, false );
|
SetCurSymbol( nullptr, false );
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -862,7 +862,7 @@ void SYMBOL_EDIT_FRAME::OnModify()
|
||||||
m_treePane->GetLibTree()->RefreshLibTree();
|
m_treePane->GetLibTree()->RefreshLibTree();
|
||||||
|
|
||||||
if( !GetTitle().StartsWith( "*" ) )
|
if( !GetTitle().StartsWith( "*" ) )
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1237,7 +1237,7 @@ void SYMBOL_EDIT_FRAME::ShowChangedLanguage()
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1637,7 +1637,7 @@ void SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic( SCH_SYMBOL* aSymbol )
|
||||||
OnToggleSymbolTree( evt );
|
OnToggleSymbolTree( evt );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( GetCurSymbol()->HasConversion() );
|
SetShowDeMorgan( GetCurSymbol()->HasConversion() );
|
||||||
UpdateSymbolMsgPanelInfo();
|
UpdateSymbolMsgPanelInfo();
|
||||||
|
|
|
@ -252,6 +252,12 @@ public:
|
||||||
UpdateSymbolMsgPanelInfo();
|
UpdateSymbolMsgPanelInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the main window title bar with the current library name and read only status
|
||||||
|
* of the library.
|
||||||
|
*/
|
||||||
|
void UpdateTitle();
|
||||||
|
|
||||||
bool IsSymbolFromSchematic() const
|
bool IsSymbolFromSchematic() const
|
||||||
{
|
{
|
||||||
// If we've already vetted closing this window, then we have no symbol anymore
|
// If we've already vetted closing this window, then we have no symbol anymore
|
||||||
|
@ -429,12 +435,6 @@ private:
|
||||||
*/
|
*/
|
||||||
bool saveLibrary( const wxString& aLibrary, bool aNewFile );
|
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.
|
* Set the current active library to \a aLibrary.
|
||||||
*
|
*
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include <widgets/symbol_filedlg_save_as.h>
|
#include <widgets/symbol_filedlg_save_as.h>
|
||||||
|
|
||||||
|
|
||||||
void SYMBOL_EDIT_FRAME::updateTitle()
|
void SYMBOL_EDIT_FRAME::UpdateTitle()
|
||||||
{
|
{
|
||||||
wxString title;
|
wxString title;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void SYMBOL_EDIT_FRAME::SelectActiveLibrary( const wxString& aLibrary )
|
||||||
if( !selectedLib.empty() )
|
if( !selectedLib.empty() )
|
||||||
SetCurLib( selectedLib );
|
SetCurLib( selectedLib );
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr
|
||||||
GetInfoBar()->Dismiss();
|
GetInfoBar()->Dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( GetCurSymbol()->HasConversion() );
|
SetShowDeMorgan( GetCurSymbol()->HasConversion() );
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ void SYMBOL_EDIT_FRAME::Save()
|
||||||
if( IsSymbolTreeShown() )
|
if( IsSymbolTreeShown() )
|
||||||
m_treePane->GetLibTree()->RefreshLibTree();
|
m_treePane->GetLibTree()->RefreshLibTree();
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ void SYMBOL_EDIT_FRAME::UpdateAfterSymbolProperties( wxString* aOldName )
|
||||||
|
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( GetCurSymbol()->Flatten()->HasConversion() );
|
SetShowDeMorgan( GetCurSymbol()->Flatten()->HasConversion() );
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
|
|
||||||
// N.B. The view needs to be rebuilt first as the Symbol Properties change may invalidate
|
// N.B. The view needs to be rebuilt first as the Symbol Properties change may invalidate
|
||||||
// the view pointers by rebuilting the field table
|
// the view pointers by rebuilting the field table
|
||||||
|
@ -1234,7 +1234,7 @@ bool SYMBOL_EDIT_FRAME::saveAllLibraries( bool aRequireConfirmation )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList()
|
||||||
|
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( symbol->HasConversion() );
|
SetShowDeMorgan( symbol->HasConversion() );
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
|
|
||||||
RebuildView();
|
RebuildView();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -156,7 +156,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList()
|
||||||
|
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( symbol->HasConversion() );
|
SetShowDeMorgan( symbol->HasConversion() );
|
||||||
updateTitle();
|
UpdateTitle();
|
||||||
|
|
||||||
RebuildView();
|
RebuildView();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
|
@ -412,6 +412,7 @@ int SYMBOL_EDITOR_CONTROL::RenameSymbol( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
editFrame->RebuildView();
|
editFrame->RebuildView();
|
||||||
editFrame->OnModify();
|
editFrame->OnModify();
|
||||||
|
editFrame->UpdateTitle();
|
||||||
|
|
||||||
// N.B. The view needs to be rebuilt first as the Symbol Properties change may
|
// N.B. The view needs to be rebuilt first as the Symbol Properties change may
|
||||||
// invalidate the view pointers by rebuilting the field table
|
// invalidate the view pointers by rebuilting the field table
|
||||||
|
|
Loading…
Reference in New Issue