Clearer titles for editing board footprints.
Also cleans up the naming on the symbol editor side.
This commit is contained in:
parent
8015334683
commit
9a213207fb
|
@ -251,7 +251,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
ReCreateVToolbar();
|
ReCreateVToolbar();
|
||||||
ReCreateOptToolbar();
|
ReCreateOptToolbar();
|
||||||
|
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
|
|
||||||
|
@ -1046,7 +1046,7 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
|
||||||
m_libMgr->UpdatePart( GetCurPart(), GetCurLib() );
|
m_libMgr->UpdatePart( GetCurPart(), GetCurLib() );
|
||||||
|
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
|
|
|
@ -342,12 +342,6 @@ public:
|
||||||
|
|
||||||
void UpdatePartSelectList();
|
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
|
* Redraw the current component loaded in library editor
|
||||||
* Display reference like in schematic (a reference U is shown U? or U?A)
|
* 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 );
|
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.
|
* 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
|
* The library list can be changed by the schematic editor after reloading a new schematic
|
||||||
|
|
|
@ -55,10 +55,10 @@
|
||||||
#include <dialogs/dialog_lib_new_component.h>
|
#include <dialogs/dialog_lib_new_component.h>
|
||||||
#include <dialog_helpers.h>
|
#include <dialog_helpers.h>
|
||||||
|
|
||||||
void LIB_EDIT_FRAME::DisplayLibInfos()
|
void LIB_EDIT_FRAME::updateTitle()
|
||||||
{
|
{
|
||||||
wxString lib = GetCurLib();
|
wxString lib = GetCurLib();
|
||||||
wxString title = _( "Symbol Library Editor" );
|
wxString title = _( "Symbol Editor" );
|
||||||
|
|
||||||
if( GetCurPart() )
|
if( GetCurPart() )
|
||||||
title += wxT( " \u2014 " ) + GetCurPart()->GetLibId().Format();
|
title += wxT( " \u2014 " ) + GetCurPart()->GetLibId().Format();
|
||||||
|
@ -77,7 +77,7 @@ void LIB_EDIT_FRAME::SelectActiveLibrary( const wxString& aLibrary )
|
||||||
if( !selectedLib.empty() )
|
if( !selectedLib.empty() )
|
||||||
SetCurLib( selectedLib );
|
SetCurLib( selectedLib );
|
||||||
|
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, const wxString& a
|
||||||
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
||||||
|
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
|
|
||||||
// Display the document information based on the entry selected just in
|
// 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 );
|
m_canvas->DrawCrossHair( DC );
|
||||||
|
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
UpdateStatusBar();
|
UpdateStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ void LIB_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
SetShowDeMorgan( part->HasConversion() );
|
SetShowDeMorgan( part->HasConversion() );
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
|
@ -139,7 +139,7 @@ void LIB_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
SetShowDeMorgan( part->HasConversion() );
|
SetShowDeMorgan( part->HasConversion() );
|
||||||
DisplayLibInfos();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
|
|
|
@ -73,7 +73,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar()
|
||||||
|
|
||||||
AddButton( ID_TO_SCH_LIB_EDITOR,
|
AddButton( ID_TO_SCH_LIB_EDITOR,
|
||||||
KiBitmap( icon_libedit_xpm ),
|
KiBitmap( icon_libedit_xpm ),
|
||||||
_( "Symbol Library Editor" ) );
|
_( "Symbol Editor" ) );
|
||||||
|
|
||||||
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||||
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
|
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
|
||||||
|
@ -84,7 +84,7 @@ void LAUNCHER_PANEL::CreateCommandToolbar()
|
||||||
|
|
||||||
AddButton( ID_TO_PCB_FP_EDITOR,
|
AddButton( ID_TO_PCB_FP_EDITOR,
|
||||||
KiBitmap( icon_modedit_xpm ),
|
KiBitmap( icon_modedit_xpm ),
|
||||||
_( "Footprint Library Editor" ) );
|
_( "Footprint Editor" ) );
|
||||||
|
|
||||||
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||||
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
|
m_buttonSizer->Add( separator, 0, wxEXPAND | wxALL, 8 );
|
||||||
|
|
|
@ -750,11 +750,17 @@ void FOOTPRINT_EDIT_FRAME::OnModify()
|
||||||
|
|
||||||
void FOOTPRINT_EDIT_FRAME::updateTitle()
|
void FOOTPRINT_EDIT_FRAME::updateTitle()
|
||||||
{
|
{
|
||||||
wxString title = _( "Footprint Library Editor" );
|
wxString title = _( "Footprint Editor" );
|
||||||
LIB_ID fpid = GetLoadedFPID();
|
LIB_ID fpid = GetLoadedFPID();
|
||||||
bool writable = true;
|
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
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue