diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 4773433fef..9be4600650 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -44,6 +44,38 @@ #define DEMORGAN_STD _( "Standard" ) #define DEMORGAN_ALT _( "Alternate" ) + +void getSelectedArea( WX_GRID* aGrid, int* aRowStart, int* aRowCount ) +{ + wxGridCellCoordsArray topLeft = aGrid->GetSelectionBlockTopLeft(); + wxGridCellCoordsArray botRight = aGrid->GetSelectionBlockBottomRight(); + + wxArrayInt cols = aGrid->GetSelectedCols(); + wxArrayInt rows = aGrid->GetSelectedRows(); + + if( topLeft.Count() && botRight.Count() ) + { + *aRowStart = topLeft[0].GetRow(); + *aRowCount = botRight[0].GetRow() - *aRowStart + 1; + } + else if( cols.Count() ) + { + *aRowStart = 0; + *aRowCount = aGrid->GetNumberRows(); + } + else if( rows.Count() ) + { + *aRowStart = rows[0]; + *aRowCount = rows.Count(); + } + else + { + *aRowStart = aGrid->GetGridCursorRow(); + *aRowCount = *aRowStart >= 0 ? 1 : 0; + } +} + + class PIN_TABLE_DATA_MODEL : public wxGridTableBase { public: @@ -438,14 +470,32 @@ public: return res; } - void RebuildRows( const LIB_PINS& aPins, bool groupByName ) + void RebuildRows( const LIB_PINS& aPins, bool groupByName, bool groupBySelection ) { - if ( GetView() ) + WX_GRID* grid = dynamic_cast( GetView() ); + + if( grid ) { + if( groupBySelection ) + { + for( LIB_PIN* pin : aPins ) + pin->ClearTempFlags(); + + int firstSelectedRow; + int selectedRowCount; + + getSelectedArea( grid, &firstSelectedRow, &selectedRowCount ); + + for( int ii = 0; ii < selectedRowCount; ++ii ) + { + for( LIB_PIN* pin : m_rows[ firstSelectedRow + ii ] ) + pin->SetFlags( TEMP_SELECTED ); + } + } + // Commit any pending in-place edits before the row gets moved out from under // the editor. - if( WX_GRID* grid = dynamic_cast( GetView() ) ) - grid->CommitPendingChanges( true ); + grid->CommitPendingChanges( true ); wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_rows.size() ); GetView()->ProcessTableMessage( msg ); @@ -453,6 +503,9 @@ public: m_rows.clear(); + if( groupBySelection ) + m_rows.emplace_back( LIB_PINS() ); + for( LIB_PIN* pin : aPins ) { if( m_unitFilter == -1 || pin->GetUnit() == 0 || pin->GetUnit() == m_unitFilter ) @@ -461,6 +514,8 @@ public: if( groupByName ) rowIndex = findRow( m_rows, pin->GetName() ); + else if( groupBySelection && pin->GetFlags() & TEMP_SELECTED ) + rowIndex = 0; if( rowIndex < 0 ) { @@ -484,12 +539,16 @@ public: for( LIB_PINS& row : m_rows ) SortPins( row ); - SortRows( sortCol, ascending ); + if( !groupBySelection ) + SortRows( sortCol, ascending ); if ( GetView() ) { wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_rows.size() ); GetView()->ProcessTableMessage( msg ); + + if( groupBySelection ) + GetView()->SelectRow( 0 ); } } @@ -747,7 +806,7 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::TransferDataToWindow() for( LIB_PIN* pin = m_part->GetNextPin( nullptr ); pin; pin = m_part->GetNextPin( pin ) ) m_pins.push_back( new LIB_PIN( *pin ) ); - m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue() ); + m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue(), false ); if( m_part->IsMulti() ) m_grid->ShowCol( COL_UNIT ); @@ -759,11 +818,6 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::TransferDataToWindow() else m_grid->HideCol( COL_DEMORGAN ); - if( m_cbGroup->GetValue() ) - m_grid->ShowCol( COL_PIN_COUNT ); - else - m_grid->HideCol( COL_PIN_COUNT ); - updateSummary(); return true; @@ -909,22 +963,31 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::IsDisplayGrouped() } +void DIALOG_LIB_EDIT_PIN_TABLE::OnGroupSelected( wxCommandEvent& event ) +{ + m_cbGroup->SetValue( false ); + + m_dataModel->RebuildRows( m_pins, false, true ); + + m_grid->ShowCol( COL_PIN_COUNT ); + m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + + adjustGridColumns(); +} + + void DIALOG_LIB_EDIT_PIN_TABLE::OnRebuildRows( wxCommandEvent& ) { if( !m_grid->CommitPendingChanges() ) return; - m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue() ); + m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue(), false ); if( m_cbGroup->GetValue() ) { m_grid->ShowCol( COL_PIN_COUNT ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); } - else - { - m_grid->HideCol( COL_PIN_COUNT ); - } adjustGridColumns(); } @@ -1016,6 +1079,14 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnUpdateUI( wxUpdateUIEvent& event ) if( !m_grid->IsCellEditControlShown() ) adjustGridColumns(); } + + int firstSelectedRow; + int selectedRowCount; + + getSelectedArea( m_grid, &firstSelectedRow, &selectedRowCount ); + + if( selectedRowCount > 1 != m_groupSelected->IsEnabled() ) + m_groupSelected->Enable( selectedRowCount > 1 ); } diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.h b/eeschema/dialogs/dialog_lib_edit_pin_table.h index 73559fdb99..22ce94a990 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.h +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.h @@ -66,6 +66,7 @@ public: void OnSize( wxSizeEvent& event ) override; void OnCellEdited( wxGridEvent& event ) override; void OnRebuildRows( wxCommandEvent& event ) override; + void OnGroupSelected( wxCommandEvent& event ) override; void OnFilterCheckBox( wxCommandEvent& event ) override; void OnFilterChoice( wxCommandEvent& event ) override; void OnUpdateUI( wxUpdateUIEvent& event ) override; diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp index 8d82f7857e..d41f8f7b98 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.cpp @@ -119,38 +119,44 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent wxBoxSizer* bBottomSizer; bBottomSizer = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bBottomSizer->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - - bBottomSizer->Add( 20, 0, 0, wxEXPAND, 5 ); + bSizer5->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bBottomSizer->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); + bSizer5->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 ); m_divider1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_divider1->Enable( false ); - bBottomSizer->Add( m_divider1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); + bSizer5->Add( m_divider1, 0, wxEXPAND|wxALL, 4 ); m_cbGroup = new wxCheckBox( this, wxID_ANY, _("Group by name"), wxDefaultPosition, wxDefaultSize, 0 ); - bBottomSizer->Add( m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); + bSizer5->Add( m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_groupSelected = new wxButton( this, wxID_ANY, _("Group Selected"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_groupSelected, 0, wxALL|wxALIGN_CENTER_VERTICAL, 7 ); m_refreshButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bBottomSizer->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 ); + bSizer5->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 ); m_divider2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_divider2->Enable( false ); - bBottomSizer->Add( m_divider2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); + bSizer5->Add( m_divider2, 0, wxEXPAND|wxALL, 4 ); m_cbFilterByUnit = new wxCheckBox( this, wxID_ANY, _("Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 ); - bBottomSizer->Add( m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bSizer5->Add( m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); wxArrayString m_unitFilterChoices; m_unitFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 ); m_unitFilter->SetSelection( 0 ); - bBottomSizer->Add( m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer5->Add( m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bBottomSizer->Add( bSizer5, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 ); @@ -182,6 +188,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this ); m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this ); m_cbGroup->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); + m_groupSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this ); m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_cbFilterByUnit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this ); m_unitFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this ); @@ -198,6 +205,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::~DIALOG_LIB_EDIT_PIN_TABLE_BASE() m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this ); m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this ); m_cbGroup->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); + m_groupSelected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this ); m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_cbFilterByUnit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this ); m_unitFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this ); diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp b/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp index a84b3de1b5..28cb685939 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.fbp @@ -567,572 +567,646 @@ bBottomSizer wxHORIZONTAL none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Add Pin - - 0 - - 0 - - -1,-1 - 0 - -1,-1 - 1 - m_addButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnAddRow - - - - 5 - wxEXPAND - 0 - - 0 - protected - 20 - - - - 10 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Delete Pin - - 0 - - 0 - - -1,-1 - 0 - -1,-1 - 1 - m_deleteButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnDeleteRow - - - - 10 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - - 1 - - - 0 - 0 - wxID_ANY - Divider - - 0 - - 0 - - - 0 - - 1 - m_divider1 - 1 - - - protected - 1 - - - - Resizable - 1 - - - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 10 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Group by name - - 0 - - - 0 - - 1 - m_cbGroup - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRebuildRows - - - - 10 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Refresh Grouping - - 0 - - 0 - - - 0 - -1,-1 - 1 - m_refreshButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRebuildRows - - - - 10 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - - 1 - - - 0 - 0 - wxID_ANY - Divider - - 0 - - 0 - - - 0 - - 1 - m_divider2 - 1 - - - protected - 1 - - - - Resizable - 1 - - - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Filter by unit: - - 0 - - - 0 + - 1 - m_cbFilterByUnit - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnFilterCheckBox - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_unitFilter - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnFilterChoice + bSizer5 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Add Pin + + 0 + + 0 + + -1,-1 + 0 + -1,-1 + 1 + m_addButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnAddRow + + + + 10 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Delete Pin + + 0 + + 0 + + -1,-1 + 0 + -1,-1 + 1 + m_deleteButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnDeleteRow + + + + 4 + wxEXPAND|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + Divider + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_divider1 + 1 + + + protected + 1 + + + + Resizable + 1 + + + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Group by name + + 0 + + + 0 + + 1 + m_cbGroup + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRebuildRows + + + + 7 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Group Selected + + 0 + + 0 + + + 0 + + 1 + m_groupSelected + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnGroupSelected + + + + 10 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Refresh Grouping + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_refreshButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRebuildRows + + + + 4 + wxEXPAND|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + Divider + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_divider2 + 1 + + + protected + 1 + + + + Resizable + 1 + + + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filter by unit: + + 0 + + + 0 + + 1 + m_cbFilterByUnit + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnFilterCheckBox + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_unitFilter + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnFilterChoice + + diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table_base.h b/eeschema/dialogs/dialog_lib_edit_pin_table_base.h index 3a520cf819..4b22db42a4 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table_base.h +++ b/eeschema/dialogs/dialog_lib_edit_pin_table_base.h @@ -53,6 +53,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM wxBitmapButton* m_deleteButton; BITMAP_BUTTON* m_divider1; wxCheckBox* m_cbGroup; + wxButton* m_groupSelected; wxBitmapButton* m_refreshButton; BITMAP_BUTTON* m_divider2; wxCheckBox* m_cbFilterByUnit; @@ -69,6 +70,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM virtual void OnAddRow( wxCommandEvent& event ) = 0; virtual void OnDeleteRow( wxCommandEvent& event ) = 0; virtual void OnRebuildRows( wxCommandEvent& event ) = 0; + virtual void OnGroupSelected( wxCommandEvent& event ) = 0; virtual void OnFilterCheckBox( wxCommandEvent& event ) = 0; virtual void OnFilterChoice( wxCommandEvent& event ) = 0; virtual void OnCancel( wxCommandEvent& event ) = 0;