diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 003987ae52..55a414408d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -51,8 +51,6 @@ set( EESCHEMA_DLGS dialogs/dialog_bom.cpp dialogs/dialog_bom_base.cpp dialogs/dialog_bus_manager.cpp - dialogs/dialog_fields_editor_global.cpp - dialogs/dialog_fields_editor_global_base.cpp dialogs/dialog_change_symbols.cpp dialogs/dialog_change_symbols_base.cpp dialogs/dialog_choose_symbol.cpp @@ -102,6 +100,8 @@ set( EESCHEMA_DLGS dialogs/dialog_schematic_find.cpp dialogs/dialog_schematic_find_base.cpp dialogs/dialog_schematic_setup.cpp + dialogs/dialog_symbol_fields_table.cpp + dialogs/dialog_symbol_fields_table_base.cpp dialogs/dialog_symbol_properties.cpp dialogs/dialog_symbol_properties_base.cpp dialogs/dialog_symbol_remap.cpp diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp similarity index 95% rename from eeschema/dialogs/dialog_fields_editor_global.cpp rename to eeschema/dialogs/dialog_symbol_fields_table.cpp index e0201d53e1..a570412aba 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -44,7 +44,7 @@ #include #include -#include "dialog_fields_editor_global.h" +#include "dialog_symbol_fields_table.h" #define DISPLAY_NAME_COLUMN 0 @@ -670,8 +670,8 @@ public: }; -DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent ) : - DIALOG_FIELDS_EDITOR_GLOBAL_BASE( parent ), +DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ) : + DIALOG_SYMBOL_FIELDS_TABLE_BASE( parent ), m_parent( parent ) { wxSize defaultDlgSize = ConvertDialogToPixels( wxSize( 600, 300 ) ); @@ -816,15 +816,15 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent // Connect Events m_grid->Connect( wxEVT_GRID_COL_SORT, - wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL::OnColSort ), NULL, this ); + wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnColSort ), NULL, this ); } -DIALOG_FIELDS_EDITOR_GLOBAL::~DIALOG_FIELDS_EDITOR_GLOBAL() +DIALOG_SYMBOL_FIELDS_TABLE::~DIALOG_SYMBOL_FIELDS_TABLE() { // Disconnect Events m_grid->Disconnect( wxEVT_GRID_COL_SORT, - wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL::OnColSort ), NULL, this ); + wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnColSort ), NULL, this ); // Delete the GRID_TRICKS. m_grid->PopEventHandler( true ); @@ -833,7 +833,7 @@ DIALOG_FIELDS_EDITOR_GLOBAL::~DIALOG_FIELDS_EDITOR_GLOBAL() } -bool DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataToWindow() +bool DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow() { if( !wxDialog::TransferDataFromWindow() ) return false; @@ -881,7 +881,7 @@ bool DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataToWindow() } -bool DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataFromWindow() +bool DIALOG_SYMBOL_FIELDS_TABLE::TransferDataFromWindow() { if( !m_grid->CommitPendingChanges() ) return false; @@ -904,9 +904,9 @@ bool DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataFromWindow() } -void DIALOG_FIELDS_EDITOR_GLOBAL::AddField( const wxString& aDisplayName, - const wxString& aCanonicalName, - bool defaultShow, bool defaultSortBy ) +void DIALOG_SYMBOL_FIELDS_TABLE::AddField( const wxString& aDisplayName, + const wxString& aCanonicalName, + bool defaultShow, bool defaultSortBy ) { m_dataModel->AddColumn( aCanonicalName ); @@ -938,7 +938,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::AddField( const wxString& aDisplayName, * Constructs the rows of m_fieldsCtrl and the columns of m_dataModel from a union of all * field names in use. */ -void DIALOG_FIELDS_EDITOR_GLOBAL::LoadFieldNames() +void DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames() { std::set userFieldNames; @@ -974,7 +974,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::LoadFieldNames() } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnAddField( wxCommandEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnAddField( wxCommandEvent& event ) { // quantities column will become new field column, so it needs to be reset auto attr = new wxGridCellAttr; @@ -1024,7 +1024,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnAddField( wxCommandEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnColumnItemToggled( wxDataViewEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnColumnItemToggled( wxDataViewEvent& event ) { EESCHEMA_SETTINGS* cfg = static_cast( Kiface().KifaceSettings() ); wxDataViewItem item = event.GetItem(); @@ -1075,7 +1075,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnColumnItemToggled( wxDataViewEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnGroupSymbolsToggled( wxCommandEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnGroupSymbolsToggled( wxCommandEvent& event ) { m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); @@ -1083,7 +1083,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnGroupSymbolsToggled( wxCommandEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnColSort( wxGridEvent& aEvent ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnColSort( wxGridEvent& aEvent ) { int sortCol = aEvent.GetCol(); bool ascending; @@ -1106,13 +1106,13 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnColSort( wxGridEvent& aEvent ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableValueChanged( wxGridEvent& aEvent ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnTableValueChanged( wxGridEvent& aEvent ) { m_grid->ForceRefresh(); } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableColSize( wxGridSizeEvent& aEvent ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnTableColSize( wxGridSizeEvent& aEvent ) { EESCHEMA_SETTINGS* cfg = static_cast( Kiface().KifaceSettings() ); int col = aEvent.GetRowOrCol(); @@ -1125,7 +1125,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableColSize( wxGridSizeEvent& aEvent ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnRegroupSymbols( wxCommandEvent& aEvent ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnRegroupSymbols( wxCommandEvent& aEvent ) { m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); @@ -1133,7 +1133,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnRegroupSymbols( wxCommandEvent& aEvent ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick( wxGridEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnTableCellClick( wxGridEvent& event ) { if( event.GetCol() == REFERENCE_FIELD ) { @@ -1159,7 +1159,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick( wxGridEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableItemContextMenu( wxGridEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnTableItemContextMenu( wxGridEvent& event ) { // TODO: Option to select footprint if FOOTPRINT column selected @@ -1167,7 +1167,7 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnTableItemContextMenu( wxGridEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnSizeFieldList( wxSizeEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnSizeFieldList( wxSizeEvent& event ) { int nameColWidth = event.GetSize().GetX() - m_showColWidth - m_groupByColWidth - 8; @@ -1182,20 +1182,20 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::OnSizeFieldList( wxSizeEvent& event ) } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnSaveAndContinue( wxCommandEvent& aEvent ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnSaveAndContinue( wxCommandEvent& aEvent ) { if( TransferDataFromWindow() ) m_parent->SaveProject(); } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnCancel( wxCommandEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnCancel( wxCommandEvent& event ) { Close(); } -void DIALOG_FIELDS_EDITOR_GLOBAL::OnClose( wxCloseEvent& event ) +void DIALOG_SYMBOL_FIELDS_TABLE::OnClose( wxCloseEvent& event ) { // This is a cancel, so commit quietly as we're going to throw the results away anyway. m_grid->CommitPendingChanges( true ); diff --git a/eeschema/dialogs/dialog_fields_editor_global.h b/eeschema/dialogs/dialog_symbol_fields_table.h similarity index 87% rename from eeschema/dialogs/dialog_fields_editor_global.h rename to eeschema/dialogs/dialog_symbol_fields_table.h index 3d7080d8c7..b483f5b3b5 100644 --- a/eeschema/dialogs/dialog_fields_editor_global.h +++ b/eeschema/dialogs/dialog_symbol_fields_table.h @@ -22,11 +22,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef DIALOG_FIELDS_EDITOR_GLOBAL_H -#define DIALOG_FIELDS_EDITOR_GLOBAL_H +#ifndef DIALOG_SYMBOL_FIELDS_TABLE_H +#define DIALOG_SYMBOL_FIELDS_TABLE_H -#include +#include #include @@ -34,11 +34,11 @@ class SCH_EDIT_FRAME; class FIELDS_EDITOR_GRID_DATA_MODEL; -class DIALOG_FIELDS_EDITOR_GLOBAL : public DIALOG_FIELDS_EDITOR_GLOBAL_BASE +class DIALOG_SYMBOL_FIELDS_TABLE : public DIALOG_SYMBOL_FIELDS_TABLE_BASE { public: - DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent ); - virtual ~DIALOG_FIELDS_EDITOR_GLOBAL(); + DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ); + virtual ~DIALOG_SYMBOL_FIELDS_TABLE(); bool TransferDataToWindow() override; bool TransferDataFromWindow() override; @@ -71,4 +71,4 @@ private: FIELDS_EDITOR_GRID_DATA_MODEL* m_dataModel; }; -#endif /* DIALOG_FIELDS_EDITOR_GLOBAL_H */ +#endif /* DIALOG_SYMBOL_FIELDS_TABLE_H */ diff --git a/eeschema/dialogs/dialog_fields_editor_global_base.cpp b/eeschema/dialogs/dialog_symbol_fields_table_base.cpp similarity index 71% rename from eeschema/dialogs/dialog_fields_editor_global_base.cpp rename to eeschema/dialogs/dialog_symbol_fields_table_base.cpp index af515b5867..1cb1290512 100644 --- a/eeschema/dialogs/dialog_fields_editor_global_base.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.cpp @@ -7,11 +7,11 @@ #include "widgets/wx_grid.h" -#include "dialog_fields_editor_global_base.h" +#include "dialog_symbol_fields_table_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); @@ -125,36 +125,36 @@ DIALOG_FIELDS_EDITOR_GLOBAL_BASE::DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* pa this->Centre( wxBOTH ); // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnClose ) ); - m_groupSymbolsBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnGroupSymbolsToggled ), NULL, this ); - m_bRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnRegroupSymbols ), NULL, this ); - m_fieldsCtrl->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnColumnItemToggled ), NULL, this ); - m_fieldsCtrl->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnSizeFieldList ), NULL, this ); - m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnAddField ), NULL, this ); - m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableValueChanged ), NULL, this ); - m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableCellClick ), NULL, this ); - m_grid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableCellClick ), NULL, this ); - m_grid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableItemContextMenu ), NULL, this ); - m_grid->Connect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableColSize ), NULL, this ); - m_buttonApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnSaveAndContinue ), NULL, this ); - m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnCancel ), NULL, this ); + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) ); + m_groupSymbolsBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); + m_bRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); + m_fieldsCtrl->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnColumnItemToggled ), NULL, this ); + m_fieldsCtrl->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeFieldList ), NULL, this ); + m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this ); + m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableValueChanged ), NULL, this ); + m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); + m_grid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); + m_grid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableItemContextMenu ), NULL, this ); + m_grid->Connect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableColSize ), NULL, this ); + m_buttonApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSaveAndContinue ), NULL, this ); + m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnCancel ), NULL, this ); } -DIALOG_FIELDS_EDITOR_GLOBAL_BASE::~DIALOG_FIELDS_EDITOR_GLOBAL_BASE() +DIALOG_SYMBOL_FIELDS_TABLE_BASE::~DIALOG_SYMBOL_FIELDS_TABLE_BASE() { // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnClose ) ); - m_groupSymbolsBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnGroupSymbolsToggled ), NULL, this ); - m_bRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnRegroupSymbols ), NULL, this ); - m_fieldsCtrl->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnColumnItemToggled ), NULL, this ); - m_fieldsCtrl->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnSizeFieldList ), NULL, this ); - m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnAddField ), NULL, this ); - m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableValueChanged ), NULL, this ); - m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableCellClick ), NULL, this ); - m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableCellClick ), NULL, this ); - m_grid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableItemContextMenu ), NULL, this ); - m_grid->Disconnect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnTableColSize ), NULL, this ); - m_buttonApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnSaveAndContinue ), NULL, this ); - m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIELDS_EDITOR_GLOBAL_BASE::OnCancel ), NULL, this ); + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) ); + m_groupSymbolsBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); + m_bRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); + m_fieldsCtrl->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnColumnItemToggled ), NULL, this ); + m_fieldsCtrl->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeFieldList ), NULL, this ); + m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableValueChanged ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableItemContextMenu ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableColSize ), NULL, this ); + m_buttonApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSaveAndContinue ), NULL, this ); + m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnCancel ), NULL, this ); } diff --git a/eeschema/dialogs/dialog_fields_editor_global_base.fbp b/eeschema/dialogs/dialog_symbol_fields_table_base.fbp similarity index 99% rename from eeschema/dialogs/dialog_fields_editor_global_base.fbp rename to eeschema/dialogs/dialog_symbol_fields_table_base.fbp index b1d46a6e89..0248936f33 100644 --- a/eeschema/dialogs/dialog_fields_editor_global_base.fbp +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.fbp @@ -11,12 +11,12 @@ res UTF-8 connect - dialog_fields_editor_global_base + dialog_symbol_fields_table_base 1000 none 1 - dialog_fields_editor_global_base + dialog_symbol_fields_table_base . @@ -43,12 +43,12 @@ wxID_ANY -1,-1 - DIALOG_FIELDS_EDITOR_GLOBAL_BASE + DIALOG_SYMBOL_FIELDS_TABLE_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Symbol Fields + Symbol Fields Table diff --git a/eeschema/dialogs/dialog_fields_editor_global_base.h b/eeschema/dialogs/dialog_symbol_fields_table_base.h similarity index 85% rename from eeschema/dialogs/dialog_fields_editor_global_base.h rename to eeschema/dialogs/dialog_symbol_fields_table_base.h index cb7b559dd3..15a29c36b5 100644 --- a/eeschema/dialogs/dialog_fields_editor_global_base.h +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.h @@ -36,9 +36,9 @@ class WX_GRID; #define OPT_GROUP_COMPONENTS 1000 /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_FIELDS_EDITOR_GLOBAL_BASE +/// Class DIALOG_SYMBOL_FIELDS_TABLE_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_FIELDS_EDITOR_GLOBAL_BASE : public DIALOG_SHIM +class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM { private: @@ -73,8 +73,8 @@ class DIALOG_FIELDS_EDITOR_GLOBAL_BASE : public DIALOG_SHIM public: - DIALOG_FIELDS_EDITOR_GLOBAL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Fields"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - ~DIALOG_FIELDS_EDITOR_GLOBAL_BASE(); + DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Fields Table"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + ~DIALOG_SYMBOL_FIELDS_TABLE_BASE(); }; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index b54e1fd0cc..575d655959 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -1811,7 +1811,7 @@ int SCH_EDITOR_CONTROL::ShowCvpcb( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::EditSymbolFields( const TOOL_EVENT& aEvent ) { - DIALOG_FIELDS_EDITOR_GLOBAL dlg( m_frame ); + DIALOG_SYMBOL_FIELDS_TABLE dlg( m_frame ); dlg.ShowQuasiModal(); return 0; }