Clearer titles for editing board footprints.

Also cleans up the naming on the symbol editor side.
This commit is contained in:
Jeff Young
2018-10-05 14:17:58 +01:00
parent 8015334683
commit 9a213207fb
6 changed files with 25 additions and 19 deletions
+2 -2
View File
@@ -251,7 +251,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
ReCreateVToolbar();
ReCreateOptToolbar();
DisplayLibInfos();
updateTitle();
DisplayCmpDoc();
UpdatePartSelectList();
@@ -1046,7 +1046,7 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
m_libMgr->UpdatePart( GetCurPart(), GetCurLib() );
UpdatePartSelectList();
DisplayLibInfos();
updateTitle();
DisplayCmpDoc();
OnModify();
m_canvas->Refresh();
+6 -6
View File
@@ -342,12 +342,6 @@ public:
void UpdatePartSelectList();
/**
* Updates the main window title bar with the current library name and read only status
* of the library.
*/
void DisplayLibInfos();
/**
* Redraw the current component loaded in library editor
* Display reference like in schematic (a reference U is shown U? or U?A)
@@ -482,6 +476,12 @@ private:
*/
bool saveLibrary( const wxString& aLibrary, bool aNewFile );
/**
* Updates the main window title bar with the current library name and read only status
* of the library.
*/
void updateTitle();
/**
* Called when the frame is activated. Tests if the current library exists.
* The library list can be changed by the schematic editor after reloading a new schematic
+5 -5
View File
@@ -55,10 +55,10 @@
#include <dialogs/dialog_lib_new_component.h>
#include <dialog_helpers.h>
void LIB_EDIT_FRAME::DisplayLibInfos()
void LIB_EDIT_FRAME::updateTitle()
{
wxString lib = GetCurLib();
wxString title = _( "Symbol Library Editor" );
wxString title = _( "Symbol Editor" );
if( GetCurPart() )
title += wxT( " \u2014 " ) + GetCurPart()->GetLibId().Format();
@@ -77,7 +77,7 @@ void LIB_EDIT_FRAME::SelectActiveLibrary( const wxString& aLibrary )
if( !selectedLib.empty() )
SetCurLib( selectedLib );
DisplayLibInfos();
updateTitle();
}
@@ -182,7 +182,7 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, const wxString& a
SetShowDeMorgan( GetCurPart()->HasConversion() );
Zoom_Automatique( false );
DisplayLibInfos();
updateTitle();
UpdatePartSelectList();
// Display the document information based on the entry selected just in
@@ -239,7 +239,7 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
m_canvas->DrawCrossHair( DC );
DisplayLibInfos();
updateTitle();
UpdateStatusBar();
}
+2 -2
View File
@@ -92,7 +92,7 @@ void LIB_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
SetDrawItem( NULL );
UpdatePartSelectList();
SetShowDeMorgan( part->HasConversion() );
DisplayLibInfos();
updateTitle();
DisplayCmpDoc();
OnModify();
m_canvas->Refresh();
@@ -139,7 +139,7 @@ void LIB_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
SetDrawItem( NULL );
UpdatePartSelectList();
SetShowDeMorgan( part->HasConversion() );
DisplayLibInfos();
updateTitle();
DisplayCmpDoc();
OnModify();
m_canvas->Refresh();
+2 -2
View File
@@ -73,7 +73,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar()
AddButton( ID_TO_SCH_LIB_EDITOR,
KiBitmap( icon_libedit_xpm ),
_( "Symbol Library Editor" ) );
_( "Symbol Editor" ) );
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
@@ -84,7 +84,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar()
AddButton( ID_TO_PCB_FP_EDITOR,
KiBitmap( icon_modedit_xpm ),
_( "Footprint Library Editor" ) );
_( "Footprint Editor" ) );
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
+8 -2
View File
@@ -750,11 +750,17 @@ void FOOTPRINT_EDIT_FRAME::OnModify()
void FOOTPRINT_EDIT_FRAME::updateTitle()
{
wxString title = _( "Footprint Library Editor" );
wxString title = _( "Footprint Editor" );
LIB_ID fpid = GetLoadedFPID();
bool writable = true;
if( fpid.IsValid() )
if( IsCurrentFPFromBoard() )
{
title += wxString::Format( wxT( " \u2014 %s [from %s.%s]" ),
GetBoard()->m_Modules->GetReference(),
Prj().GetProjectName(), PcbFileExtension );
}
else if( fpid.IsValid() )
{
try
{