Make sure the title is updated when file is saved/reverted/etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7626
This commit is contained in:
parent
67c7e7c759
commit
91e876ce0d
|
@ -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 );
|
||||
|
|
|
@ -549,6 +549,7 @@ void SYMBOL_EDIT_FRAME::Save()
|
|||
}
|
||||
|
||||
m_treePane->GetLibTree()->RefreshLibTree();
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1054,6 +1054,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory,
|
|||
|
||||
GetScreen()->ClrModify();
|
||||
GetScreen()->ClrSave();
|
||||
UpdateTitle();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -252,6 +252,7 @@ int FOOTPRINT_EDITOR_CONTROL::Save( const TOOL_EVENT& aEvent )
|
|||
|
||||
canvas()->ForceRefresh();
|
||||
m_frame->ClearModify();
|
||||
m_frame->UpdateTitle();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue