Symbol Fields Table: add selection controls
Allows cross-probing to other editors. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8188
This commit is contained in:
parent
a7dc720271
commit
6ae8968a5b
|
@ -280,6 +280,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent )
|
|||
SetSize( dlgSize );
|
||||
|
||||
m_nbPages->SetSelection( cfg->m_FieldEditorPanel.page );
|
||||
m_radioSelect->SetSelection( cfg->m_FieldEditorPanel.selection_mode );
|
||||
|
||||
m_outputFileName->SetValue( cfg->m_FieldEditorPanel.export_filename );
|
||||
|
||||
|
@ -290,8 +291,8 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent )
|
|||
wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnColSort ), nullptr, this );
|
||||
m_grid->Connect( wxEVT_GRID_COL_MOVE,
|
||||
wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnColMove ), nullptr, this );
|
||||
m_grid->Connect( wxEVT_GRID_RANGE_SELECT,
|
||||
wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected ),
|
||||
m_grid->Connect( wxEVT_GRID_RANGE_SELECTED,
|
||||
wxGridRangeSelectEventHandler( DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected ),
|
||||
nullptr, this );
|
||||
m_cbBomPresets->Bind( wxEVT_CHOICE, &DIALOG_SYMBOL_FIELDS_TABLE::onBomPresetChanged, this );
|
||||
m_cbBomFmtPresets->Bind( wxEVT_CHOICE, &DIALOG_SYMBOL_FIELDS_TABLE::onBomFmtPresetChanged, this );
|
||||
|
@ -421,6 +422,8 @@ DIALOG_SYMBOL_FIELDS_TABLE::~DIALOG_SYMBOL_FIELDS_TABLE()
|
|||
cfg->m_FieldEditorPanel.height = GetSize().y;
|
||||
cfg->m_FieldEditorPanel.page = m_nbPages->GetSelection();
|
||||
cfg->m_FieldEditorPanel.export_filename = m_outputFileName->GetValue();
|
||||
cfg->m_FieldEditorPanel.selection_mode = m_radioSelect->GetSelection();
|
||||
|
||||
|
||||
for( int i = 0; i < m_grid->GetNumberCols(); i++ )
|
||||
{
|
||||
|
@ -964,9 +967,9 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableCellClick( wxGridEvent& event )
|
|||
if( m_dataModel->ColIsReference( event.GetCol() ) )
|
||||
{
|
||||
m_grid->ClearSelection();
|
||||
m_grid->SetGridCursor( event.GetRow(), event.GetCol() );
|
||||
|
||||
m_dataModel->ExpandCollapseRow( event.GetRow() );
|
||||
m_grid->SetGridCursor( event.GetRow(), event.GetCol() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -974,41 +977,58 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableCellClick( wxGridEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected( wxGridEvent& event )
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected( wxGridRangeSelectEvent& aEvent )
|
||||
{
|
||||
wxGridCellCoordsArray selectedCells = m_grid->GetSelectedCells();
|
||||
// Multi-select can grab the rows that are expanded child refs, and also the row
|
||||
// containing the list of all child refs. Make sure we add refs/symbols uniquely
|
||||
std::set<SCH_REFERENCE> refs;
|
||||
std::set<SCH_ITEM*> symbols;
|
||||
|
||||
if( selectedCells.GetCount() == 1 )
|
||||
// This handler handles selecting and deselecting
|
||||
if( aEvent.Selecting() )
|
||||
{
|
||||
int row = selectedCells[0].GetRow();
|
||||
int flag = m_dataModel->GetRowFlags( row );
|
||||
std::vector<SCH_REFERENCE> refs = m_dataModel->GetRowReferences( row );
|
||||
for( int i = aEvent.GetTopRow(); i <= aEvent.GetBottomRow(); i++ )
|
||||
for( SCH_REFERENCE ref : m_dataModel->GetRowReferences( i ) )
|
||||
refs.insert( ref );
|
||||
|
||||
// Focus Eeschema view on the symbol selected in the dialog
|
||||
// TODO: Highlight or select more than one unit
|
||||
if( ( flag == GROUP_SINGLETON || flag == CHILD_ITEM ) && refs.size() >= 1 )
|
||||
{
|
||||
SCH_EDITOR_CONTROL* editor = m_parent->GetToolManager()->GetTool<SCH_EDITOR_CONTROL>();
|
||||
|
||||
std::sort( refs.begin(), refs.end(),
|
||||
[]( const SCH_REFERENCE& a, const SCH_REFERENCE& b )
|
||||
{
|
||||
return a.GetUnit() < b.GetUnit();
|
||||
} );
|
||||
|
||||
// search and highlight the symbol found by its full path.
|
||||
// It allows select of not yet annotated or duplicaded symbols
|
||||
wxString symbol_path = refs[0].GetFullPath();
|
||||
// wxString reference = refs[0].GetRef() + refs[0].GetRefNumber(); // Not used
|
||||
editor->FindSymbolAndItem( &symbol_path, nullptr, true, HIGHLIGHT_SYMBOL, wxEmptyString );
|
||||
}
|
||||
|
||||
return;
|
||||
for( const SCH_REFERENCE& ref : refs )
|
||||
symbols.insert( ref.GetSymbol() );
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
switch( m_radioSelect->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
SCH_EDITOR_CONTROL* editor = m_parent->GetToolManager()->GetTool<SCH_EDITOR_CONTROL>();
|
||||
|
||||
// Use of full path based on UUID allows select of not yet annotated or duplicaded symbols
|
||||
wxString symbol_path = refs.begin()->GetFullPath();
|
||||
|
||||
if( refs.size() > 0 )
|
||||
// Focus only handles on item at this time
|
||||
editor->FindSymbolAndItem( &symbol_path, nullptr, true, HIGHLIGHT_SYMBOL,
|
||||
wxEmptyString );
|
||||
else
|
||||
m_parent->FocusOnItem( nullptr );
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
EE_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<EE_SELECTION_TOOL>();
|
||||
|
||||
std::vector<SCH_ITEM*> items( symbols.begin(), symbols.end() );
|
||||
|
||||
if( refs.size() > 0 )
|
||||
selTool->SyncSelection( refs.begin()->GetSheetPath(), nullptr, items );
|
||||
else
|
||||
selTool->ClearSelection();
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnTableItemContextMenu( wxGridEvent& event )
|
||||
{
|
||||
// TODO: Option to select footprint if FOOTPRINT column selected
|
||||
|
|
|
@ -61,7 +61,7 @@ private:
|
|||
void OnColSort( wxGridEvent& aEvent );
|
||||
void OnColMove( wxGridEvent& aEvent );
|
||||
void OnColLabelChange( wxDataViewEvent& aEvent );
|
||||
void OnTableRangeSelected( wxGridEvent& event );
|
||||
void OnTableRangeSelected( wxGridRangeSelectEvent& aEvent );
|
||||
|
||||
void OnColumnItemToggled( wxDataViewEvent& event ) override;
|
||||
void OnGroupSymbolsToggled( wxCommandEvent& event ) override;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -119,6 +119,18 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
|
|||
|
||||
bRightSizer->Add( bControls, 0, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bControls1;
|
||||
bControls1 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxString m_radioSelectChoices[] = { _("Highlight"), _("Select"), _("Off") };
|
||||
int m_radioSelectNChoices = sizeof( m_radioSelectChoices ) / sizeof( wxString );
|
||||
m_radioSelect = new wxRadioBox( m_rightPanel, wxID_ANY, _("Selection Control"), wxDefaultPosition, wxDefaultSize, m_radioSelectNChoices, m_radioSelectChoices, 3, wxRA_SPECIFY_COLS );
|
||||
m_radioSelect->SetSelection( 0 );
|
||||
bControls1->Add( m_radioSelect, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bRightSizer->Add( bControls1, 0, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
m_grid = new WX_GRID( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
// Grid
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<property name="center">wxBOTH</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="extra_style"></property>
|
||||
|
@ -89,7 +88,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -147,7 +145,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -208,7 +205,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -267,7 +263,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -337,7 +332,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -400,7 +394,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -449,7 +442,6 @@
|
|||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -511,7 +503,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -586,7 +577,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -661,7 +651,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -733,7 +722,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -804,7 +792,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -876,7 +863,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -946,7 +932,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1016,7 +1001,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1086,7 +1070,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1156,7 +1139,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1230,7 +1212,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1277,6 +1258,83 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bControls1</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Highlight" "Select" "Off"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Selection Control</property>
|
||||
<property name="majorDimension">3</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_radioSelect</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
|
@ -1315,7 +1373,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="drag_col_move">1</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
|
@ -1404,7 +1461,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1490,7 +1546,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1553,7 +1608,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1617,7 +1671,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1679,7 +1732,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1745,7 +1797,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1807,7 +1858,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1873,7 +1923,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -1935,7 +1984,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2001,7 +2049,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2063,7 +2110,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2129,7 +2175,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2192,7 +2237,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2257,7 +2301,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2320,7 +2363,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2399,7 +2441,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2461,7 +2502,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2531,7 +2571,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2615,7 +2654,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2692,7 +2730,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2767,7 +2804,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2861,7 +2897,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
@ -2936,7 +2971,6 @@
|
|||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -31,6 +31,7 @@ class WX_GRID;
|
|||
#include <wx/panel.h>
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/splitter.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -68,6 +69,7 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_groupSymbolsBox;
|
||||
BITMAP_BUTTON* m_separator3;
|
||||
wxBitmapButton* m_bRefresh;
|
||||
wxRadioBox* m_radioSelect;
|
||||
WX_GRID* m_grid;
|
||||
wxPanel* m_panelExport;
|
||||
wxStaticText* m_labelBomExportPresets;
|
||||
|
|
|
@ -459,6 +459,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
|||
m_params.emplace_back( new PARAM<wxString>( "field_editor.export_filename",
|
||||
&m_FieldEditorPanel.export_filename, wxT( "" ) ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "field_editor.selection_mode",
|
||||
&m_FieldEditorPanel.selection_mode, 0 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "plot.background_color",
|
||||
&m_PlotPanel.background_color, false ) );
|
||||
|
||||
|
|
|
@ -220,6 +220,7 @@ public:
|
|||
int height;
|
||||
int page;
|
||||
wxString export_filename;
|
||||
int selection_mode;
|
||||
};
|
||||
|
||||
struct PANEL_LIB_VIEW
|
||||
|
|
|
@ -381,4 +381,4 @@ static struct SCH_ITEM_DESC
|
|||
}
|
||||
} _SCH_ITEM_DESC;
|
||||
|
||||
IMPLEMENT_ENUM_TO_WXANY( SCH_LAYER_ID )
|
||||
IMPLEMENT_ENUM_TO_WXANY( SCH_LAYER_ID )
|
||||
|
|
|
@ -126,6 +126,11 @@ public:
|
|||
return m_sheetPath.PathAsString() + m_symbolUuid.AsString();
|
||||
}
|
||||
|
||||
/*
|
||||
* Compares by full path to make std::set work
|
||||
*/
|
||||
bool operator<( const SCH_REFERENCE& aRef ) const { return GetFullPath() < aRef.GetFullPath(); }
|
||||
|
||||
/**
|
||||
* Update the annotation of the symbol according the current object state.
|
||||
*/
|
||||
|
|
|
@ -1744,7 +1744,11 @@ void EE_SELECTION_TOOL::SyncSelection( const std::optional<SCH_SHEET_PATH>& targ
|
|||
|
||||
// Perform individual selection of each item before processing the event.
|
||||
for( SCH_ITEM* item : items )
|
||||
select( item );
|
||||
{
|
||||
// Make sure we only select items on the current screen
|
||||
if( m_frame->GetScreen()->CheckIfOnDrawList( item ) )
|
||||
select( item );
|
||||
}
|
||||
|
||||
BOX2I bbox = m_selection.GetBoundingBox();
|
||||
|
||||
|
|
Loading…
Reference in New Issue