Browse Source

Make sure the title is updated when file is saved/reverted/etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/7626
6.0.7
Jeff Young 5 years ago
parent
commit
91e876ce0d
  1. 1
      eeschema/files-io.cpp
  2. 1
      eeschema/symbol_editor/symbol_editor.cpp
  3. 1
      pcbnew/files.cpp
  4. 8
      pcbnew/footprint_edit_frame.cpp
  5. 7
      pcbnew/footprint_edit_frame.h
  6. 2
      pcbnew/footprint_editor_utils.cpp
  7. 2
      pcbnew/footprint_libraries_utils.cpp
  8. 1
      pcbnew/tools/footprint_editor_control.cpp

1
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 );

1
eeschema/symbol_editor/symbol_editor.cpp

@ -549,6 +549,7 @@ void SYMBOL_EDIT_FRAME::Save()
}
m_treePane->GetLibTree()->RefreshLibTree();
updateTitle();
}

1
pcbnew/files.cpp

@ -1054,6 +1054,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory,
GetScreen()->ClrModify();
GetScreen()->ClrSave();
UpdateTitle();
return true;
}

8
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();
}

7
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();

2
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();
}

2
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;

1
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();
}
}

Loading…
Cancel
Save