mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Merge branch kicad:master into master
This commit is contained in:
commit
84b4eebe76
@ -35,8 +35,11 @@ DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS
|
|||||||
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE( aFrame ),
|
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE( aFrame ),
|
||||||
m_parentTool( aParentTool )
|
m_parentTool( aParentTool )
|
||||||
{
|
{
|
||||||
|
m_bSizer1 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
m_bSizer2 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
// Generate the sheet source grid
|
// Generate the sheet source grid
|
||||||
m_sheetGrid = new WX_GRID( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_sheetGrid = new WX_GRID( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||||
m_sheetGrid->PushEventHandler( new GRID_TRICKS( static_cast<WX_GRID*>( m_sheetGrid ) ) );
|
m_sheetGrid->PushEventHandler( new GRID_TRICKS( static_cast<WX_GRID*>( m_sheetGrid ) ) );
|
||||||
m_sheetGrid->CreateGrid( 0, 3 );
|
m_sheetGrid->CreateGrid( 0, 3 );
|
||||||
m_sheetGrid->EnableEditing( false );
|
m_sheetGrid->EnableEditing( false );
|
||||||
@ -61,11 +64,13 @@ DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS
|
|||||||
m_sheetGrid->SetColLabelValue( 1, _( "Sheet Path" ) );
|
m_sheetGrid->SetColLabelValue( 1, _( "Sheet Path" ) );
|
||||||
m_sheetGrid->SetColLabelValue( 2, _( "Sheet Name" ) );
|
m_sheetGrid->SetColLabelValue( 2, _( "Sheet Name" ) );
|
||||||
m_sheetGrid->AutoSizeColumn( 1 );
|
m_sheetGrid->AutoSizeColumn( 1 );
|
||||||
m_sourceNotebook->AddPage( m_sheetGrid, _( "Sheets" ) );
|
m_bSizer1->Add( m_sheetGrid, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
m_panel1->SetSizer( m_bSizer1 );
|
||||||
|
m_panel1->Layout();
|
||||||
|
m_bSizer1->Fit( m_panel1 );
|
||||||
|
|
||||||
// Generate the component class source grid
|
// Generate the component class source grid
|
||||||
m_componentClassGrid =
|
m_componentClassGrid = new WX_GRID( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||||
new WX_GRID( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_componentClassGrid->CreateGrid( 0, 2 );
|
m_componentClassGrid->CreateGrid( 0, 2 );
|
||||||
m_componentClassGrid->EnableEditing( false );
|
m_componentClassGrid->EnableEditing( false );
|
||||||
m_componentClassGrid->EnableGridLines( true );
|
m_componentClassGrid->EnableGridLines( true );
|
||||||
@ -87,7 +92,10 @@ DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS
|
|||||||
m_componentClassGrid->SetColLabelValue( 0, _( "Generate" ) );
|
m_componentClassGrid->SetColLabelValue( 0, _( "Generate" ) );
|
||||||
m_componentClassGrid->SetColLabelValue( 1, _( "Component Class" ) );
|
m_componentClassGrid->SetColLabelValue( 1, _( "Component Class" ) );
|
||||||
m_componentClassGrid->AutoSizeColumn( 1 );
|
m_componentClassGrid->AutoSizeColumn( 1 );
|
||||||
m_sourceNotebook->AddPage( m_componentClassGrid, _( "Component Classes" ) );
|
m_bSizer2->Add( m_componentClassGrid, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
m_panel2->SetSizer( m_bSizer2 );
|
||||||
|
m_panel2->Layout();
|
||||||
|
m_bSizer2->Fit( m_panel2 );
|
||||||
|
|
||||||
// Generate the group source grid
|
// Generate the group source grid
|
||||||
m_groupGrid = new WX_GRID( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_groupGrid = new WX_GRID( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
@ -177,15 +185,12 @@ DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sheetGrid->SetMaxSize( wxSize( -1, 800 ) );
|
|
||||||
m_sheetGrid->Fit();
|
m_sheetGrid->Fit();
|
||||||
m_componentClassGrid->SetMaxSize( wxSize( -1, 800 ) );
|
|
||||||
m_componentClassGrid->Fit();
|
m_componentClassGrid->Fit();
|
||||||
m_groupGrid->SetMaxSize( wxSize( -1, 800 ) );
|
m_groupGrid->SetMaxSize( wxSize( -1, 800 ) );
|
||||||
m_groupGrid->Fit();
|
m_groupGrid->Fit();
|
||||||
m_cbGroupItems->SetValue( raData->m_options.m_groupItems );
|
m_cbGroupItems->SetValue( raData->m_options.m_groupItems );
|
||||||
m_cbReplaceExisting->SetValue( raData->m_replaceExisting );
|
m_cbReplaceExisting->SetValue( raData->m_replaceExisting );
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
if( m_sheetGrid->GetNumberRows() == 1 )
|
if( m_sheetGrid->GetNumberRows() == 1 )
|
||||||
|
@ -50,6 +50,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
MULTICHANNEL_TOOL* m_parentTool;
|
MULTICHANNEL_TOOL* m_parentTool;
|
||||||
|
|
||||||
|
wxBoxSizer* m_bSizer1;
|
||||||
|
wxBoxSizer* m_bSizer2;
|
||||||
wxGrid* m_sheetGrid;
|
wxGrid* m_sheetGrid;
|
||||||
wxGrid* m_componentClassGrid;
|
wxGrid* m_componentClassGrid;
|
||||||
wxGrid* m_groupGrid;
|
wxGrid* m_groupGrid;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -11,21 +11,31 @@
|
|||||||
|
|
||||||
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_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_MULTICHANNEL_GENERATE_RULE_AREAS_BASE::DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_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( 500,-1 ), wxDefaultSize );
|
this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
|
||||||
|
|
||||||
m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizer3;
|
wxFlexGridSizer* fgSizer3;
|
||||||
fgSizer3 = new wxFlexGridSizer( 3, 1, 0, 0 );
|
fgSizer3 = new wxFlexGridSizer( 0, 1, 0, 0 );
|
||||||
fgSizer3->AddGrowableCol( 0 );
|
fgSizer3->AddGrowableCol( 0 );
|
||||||
fgSizer3->AddGrowableRow( 0 );
|
fgSizer3->AddGrowableRow( 0 );
|
||||||
fgSizer3->SetFlexibleDirection( wxBOTH );
|
fgSizer3->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
m_sourceNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_sourceNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_sourceNotebook->SetMinSize( wxSize( 600,400 ) );
|
||||||
|
|
||||||
|
m_panel1 = new wxPanel( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
m_sourceNotebook->AddPage( m_panel1, _("Sheets"), false );
|
||||||
|
m_panel2 = new wxPanel( m_sourceNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
m_sourceNotebook->AddPage( m_panel2, _("Component Classes"), false );
|
||||||
|
|
||||||
fgSizer3->Add( m_sourceNotebook, 1, wxEXPAND | wxALL, 5 );
|
fgSizer3->Add( m_sourceNotebook, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer4;
|
||||||
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer13;
|
wxBoxSizer* bSizer13;
|
||||||
bSizer13 = new wxBoxSizer( wxVERTICAL );
|
bSizer13 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
@ -57,11 +67,9 @@ DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE::DIALOG_MULTICHANNEL_GENERATE_RULE_
|
|||||||
fgSizer3->Add( bottomButtonsSizer, 0, wxEXPAND|wxLEFT, 5 );
|
fgSizer3->Add( bottomButtonsSizer, 0, wxEXPAND|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_GeneralBoxSizer->Add( fgSizer3, 1, wxEXPAND, 5 );
|
this->SetSizer( fgSizer3 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( m_GeneralBoxSizer );
|
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
fgSizer3->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE::OnInitDlg ) );
|
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE::OnInitDlg ) );
|
||||||
|
@ -46,11 +46,11 @@
|
|||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size">-1,-1</property>
|
||||||
<property name="minimum_size">500,-1</property>
|
<property name="minimum_size">-1,-1</property>
|
||||||
<property name="name">DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE</property>
|
<property name="name">DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">548,328</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Generate Multichannel Rule Areas</property>
|
<property name="title">Generate Multichannel Rule Areas</property>
|
||||||
@ -61,15 +61,6 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnInitDialog">OnInitDlg</event>
|
<event name="OnInitDialog">OnInitDlg</event>
|
||||||
<event name="OnUpdateUI">OnUpdateUI</event>
|
<event name="OnUpdateUI">OnUpdateUI</event>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
|
||||||
<property name="minimum_size">-1,-1</property>
|
|
||||||
<property name="name">m_GeneralBoxSizer</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">private</property>
|
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND</property>
|
|
||||||
<property name="proportion">1</property>
|
|
||||||
<object class="wxFlexGridSizer" expanded="true">
|
<object class="wxFlexGridSizer" expanded="true">
|
||||||
<property name="cols">1</property>
|
<property name="cols">1</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
@ -80,7 +71,7 @@
|
|||||||
<property name="name">fgSizer3</property>
|
<property name="name">fgSizer3</property>
|
||||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="rows">3</property>
|
<property name="rows">0</property>
|
||||||
<property name="vgap">0</property>
|
<property name="vgap">0</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
@ -118,10 +109,10 @@
|
|||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size">-1,-1</property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size">600,400</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_sourceNotebook</property>
|
<property name="name">m_sourceNotebook</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
@ -134,13 +125,129 @@
|
|||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnNotebookPageChanged">OnNotebookPageChanged</event>
|
<event name="OnNotebookPageChanged">OnNotebookPageChanged</event>
|
||||||
|
<object class="notebookpage" expanded="true">
|
||||||
|
<property name="bitmap"></property>
|
||||||
|
<property name="label">Sheets</property>
|
||||||
|
<property name="select">0</property>
|
||||||
|
<object class="wxPanel" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</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="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="drag_accept_files">0</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="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size">-1,-1</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_panel1</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="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="notebookpage" expanded="true">
|
||||||
|
<property name="bitmap"></property>
|
||||||
|
<property name="label">Component Classes</property>
|
||||||
|
<property name="select">0</property>
|
||||||
|
<object class="wxPanel" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</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="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="drag_accept_files">0</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="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_panel2</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="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
@ -148,6 +255,17 @@
|
|||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer4</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="false">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="false">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer13</property>
|
<property name="name">bSizer13</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
@ -217,11 +335,11 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -284,11 +402,11 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="false">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bottomButtonsSizer</property>
|
<property name="name">bottomButtonsSizer</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
@ -326,6 +444,4 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</wxFormBuilder_Project>
|
</wxFormBuilder_Project>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -11,14 +11,18 @@
|
|||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
|
#include <wx/panel.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/notebook.h>
|
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
@ -30,10 +34,11 @@
|
|||||||
class DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE : public DIALOG_SHIM
|
class DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
wxBoxSizer* m_GeneralBoxSizer;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxNotebook* m_sourceNotebook;
|
wxNotebook* m_sourceNotebook;
|
||||||
|
wxPanel* m_panel1;
|
||||||
|
wxPanel* m_panel2;
|
||||||
wxCheckBox* m_cbReplaceExisting;
|
wxCheckBox* m_cbReplaceExisting;
|
||||||
wxCheckBox* m_cbGroupItems;
|
wxCheckBox* m_cbGroupItems;
|
||||||
wxStdDialogButtonSizer* m_sdbSizerStdButtons;
|
wxStdDialogButtonSizer* m_sdbSizerStdButtons;
|
||||||
@ -48,7 +53,7 @@ class DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE : public DIALOG_SHIM
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Generate Multichannel Rule Areas"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 548,328 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Generate Multichannel Rule Areas"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE();
|
~DIALOG_MULTICHANNEL_GENERATE_RULE_AREAS_BASE();
|
||||||
|
|
||||||
|
@ -24,9 +24,12 @@
|
|||||||
|
|
||||||
#include <dialogs/dialog_multichannel_repeat_layout.h>
|
#include <dialogs/dialog_multichannel_repeat_layout.h>
|
||||||
#include <widgets/wx_grid.h>
|
#include <widgets/wx_grid.h>
|
||||||
|
#include <grid_tricks.h>
|
||||||
#include <pcb_edit_frame.h>
|
#include <pcb_edit_frame.h>
|
||||||
#include <tools/multichannel_tool.h>
|
#include <tools/multichannel_tool.h>
|
||||||
#include <zone.h>
|
#include <zone.h>
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
|
|
||||||
DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
||||||
PCB_BASE_FRAME* aFrame,
|
PCB_BASE_FRAME* aFrame,
|
||||||
@ -34,6 +37,7 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
|||||||
DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE( aFrame ),
|
DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE( aFrame ),
|
||||||
m_parentTool( aParentTool )
|
m_parentTool( aParentTool )
|
||||||
{
|
{
|
||||||
|
m_board = aFrame->GetBoard();
|
||||||
auto data = m_parentTool->GetData();
|
auto data = m_parentTool->GetData();
|
||||||
m_refRAName->SetLabelText( data->m_refRA->m_area->GetZoneName() );
|
m_refRAName->SetLabelText( data->m_refRA->m_area->GetZoneName() );
|
||||||
|
|
||||||
@ -63,12 +67,14 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
m_raGrid->PushEventHandler( new GRID_TRICKS( static_cast<WX_GRID*>( m_raGrid ) ) );
|
||||||
m_raGrid->ClearGrid();
|
m_raGrid->ClearGrid();
|
||||||
m_raGrid->EnableEditing( true );
|
m_raGrid->EnableEditing( true );
|
||||||
m_raGrid->HideRowLabels();
|
m_raGrid->HideRowLabels();
|
||||||
m_raGrid->SetColLabelValue( 0, wxT("Copy") );
|
m_raGrid->SetColLabelValue( 0, wxT("Copy") );
|
||||||
m_raGrid->SetColLabelValue( 1, wxT("Target Rule Area") );
|
m_raGrid->SetColLabelValue( 1, wxT("Target Rule Area") );
|
||||||
m_raGrid->SetColLabelValue( 2, wxT("Status") );
|
m_raGrid->SetColLabelValue( 2, wxT("Status") );
|
||||||
|
m_raGrid->SetColLabelValue( 3, wxT( "RefFp" ) );
|
||||||
m_raGrid->AutoSizeColumn( 1 );
|
m_raGrid->AutoSizeColumn( 1 );
|
||||||
m_raGrid->AppendRows( m_targetRAs.size() - 1 );
|
m_raGrid->AppendRows( m_targetRAs.size() - 1 );
|
||||||
|
|
||||||
@ -82,11 +88,22 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_raGrid->SetMaxSize( wxSize( -1, 800 ) );
|
m_raGrid->SetMaxSize( wxSize( -1, 400 ) );
|
||||||
m_raGrid->Fit();
|
m_raGrid->Fit();
|
||||||
|
|
||||||
|
wxArrayString refFpNames;
|
||||||
|
refFpNames.push_back( "" );
|
||||||
|
|
||||||
|
for( FOOTPRINT* fp : data->m_refRA->m_raFootprints )
|
||||||
|
refFpNames.push_back( fp->GetReference() );
|
||||||
|
|
||||||
|
refFpNames.Sort();
|
||||||
|
m_refAnchorFp->Set( refFpNames );
|
||||||
|
m_refAnchorFp->SetSelection( 0 );
|
||||||
|
|
||||||
m_cbCopyPlacement->SetValue( data->m_options.m_copyPlacement );
|
m_cbCopyPlacement->SetValue( data->m_options.m_copyPlacement );
|
||||||
m_cbCopyRouting->SetValue( data->m_options.m_copyRouting );
|
m_cbCopyRouting->SetValue( data->m_options.m_copyRouting );
|
||||||
|
m_cbCopyOnlyConnectedRouting->SetValue( data->m_options.m_connectedRoutingOnly );
|
||||||
m_cbGroupItems->SetValue( data->m_options.m_groupItems );
|
m_cbGroupItems->SetValue( data->m_options.m_groupItems );
|
||||||
m_cbCopyOtherItems->SetValue( data->m_options.m_copyOtherItems );
|
m_cbCopyOtherItems->SetValue( data->m_options.m_copyOtherItems );
|
||||||
m_cbIncludeLockedComponents->SetValue( data->m_options.m_includeLockedItems );
|
m_cbIncludeLockedComponents->SetValue( data->m_options.m_includeLockedItems );
|
||||||
@ -97,6 +114,10 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT::DIALOG_MULTICHANNEL_REPEAT_LAYOUT (
|
|||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DIALOG_MULTICHANNEL_REPEAT_LAYOUT::~DIALOG_MULTICHANNEL_REPEAT_LAYOUT()
|
||||||
|
{
|
||||||
|
m_raGrid->PopEventHandler( true );
|
||||||
|
}
|
||||||
|
|
||||||
bool DIALOG_MULTICHANNEL_REPEAT_LAYOUT::TransferDataFromWindow()
|
bool DIALOG_MULTICHANNEL_REPEAT_LAYOUT::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
@ -112,11 +133,25 @@ bool DIALOG_MULTICHANNEL_REPEAT_LAYOUT::TransferDataFromWindow()
|
|||||||
|
|
||||||
data->m_options.m_copyPlacement = m_cbCopyPlacement->GetValue();
|
data->m_options.m_copyPlacement = m_cbCopyPlacement->GetValue();
|
||||||
data->m_options.m_copyRouting = m_cbCopyRouting->GetValue();
|
data->m_options.m_copyRouting = m_cbCopyRouting->GetValue();
|
||||||
|
data->m_options.m_connectedRoutingOnly = m_cbCopyOnlyConnectedRouting->GetValue();
|
||||||
data->m_options.m_copyOtherItems = m_cbCopyOtherItems->GetValue();
|
data->m_options.m_copyOtherItems = m_cbCopyOtherItems->GetValue();
|
||||||
data->m_options.m_groupItems = m_cbGroupItems->GetValue();
|
data->m_options.m_groupItems = m_cbGroupItems->GetValue();
|
||||||
data->m_options.m_includeLockedItems = m_cbIncludeLockedComponents->GetValue();
|
data->m_options.m_includeLockedItems = m_cbIncludeLockedComponents->GetValue();
|
||||||
data->m_options.m_moveOffRAComponents = m_cbIncludeOffRAComponents->GetValue();
|
data->m_options.m_moveOffRAComponents = m_cbIncludeOffRAComponents->GetValue();
|
||||||
|
|
||||||
|
if( m_refAnchorFp->GetString( m_refAnchorFp->GetSelection() ) == "" )
|
||||||
|
{
|
||||||
|
data->m_options.m_anchorFp = nullptr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for( FOOTPRINT* fp : m_board->Footprints() )
|
||||||
|
{
|
||||||
|
if( fp->GetReference() == m_refAnchorFp->GetString( m_refAnchorFp->GetSelection() ) )
|
||||||
|
data->m_options.m_anchorFp = fp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size">800,-1</property>
|
<property name="minimum_size">-1,-1</property>
|
||||||
<property name="name">DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE</property>
|
<property name="name">DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">-1,-1</property>
|
<property name="size">-1,-1</property>
|
||||||
@ -61,22 +61,13 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnInitDialog">OnInitDlg</event>
|
<event name="OnInitDialog">OnInitDlg</event>
|
||||||
<event name="OnUpdateUI">OnUpdateUI</event>
|
<event name="OnUpdateUI">OnUpdateUI</event>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
|
||||||
<property name="minimum_size">800,300</property>
|
|
||||||
<property name="name">m_GeneralBoxSizer</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">private</property>
|
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND</property>
|
|
||||||
<property name="proportion">1</property>
|
|
||||||
<object class="wxFlexGridSizer" expanded="true">
|
<object class="wxFlexGridSizer" expanded="true">
|
||||||
<property name="cols">1</property>
|
<property name="cols">1</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols">0</property>
|
<property name="growablecols">0</property>
|
||||||
<property name="growablerows">2</property>
|
<property name="growablerows">1</property>
|
||||||
<property name="hgap">0</property>
|
<property name="hgap">0</property>
|
||||||
<property name="minimum_size">800,300</property>
|
<property name="minimum_size">600,-1</property>
|
||||||
<property name="name">fgSizer3</property>
|
<property name="name">fgSizer3</property>
|
||||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
@ -171,7 +162,7 @@
|
|||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||||
<property name="col_label_size"></property>
|
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||||
<property name="col_label_values"></property>
|
<property name="col_label_values"></property>
|
||||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||||
<property name="cols">3</property>
|
<property name="cols">3</property>
|
||||||
@ -183,7 +174,7 @@
|
|||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
<property name="drag_accept_files">0</property>
|
||||||
<property name="drag_col_move">1</property>
|
<property name="drag_col_move">0</property>
|
||||||
<property name="drag_col_size">1</property>
|
<property name="drag_col_size">1</property>
|
||||||
<property name="drag_grid_size">0</property>
|
<property name="drag_grid_size">0</property>
|
||||||
<property name="drag_row_size">1</property>
|
<property name="drag_row_size">1</property>
|
||||||
@ -204,10 +195,10 @@
|
|||||||
<property name="margin_width">0</property>
|
<property name="margin_width">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size">-1,-1</property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size">-1,-1</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_raGrid</property>
|
<property name="name">m_raGrid</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
@ -230,7 +221,7 @@
|
|||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style">wxVSCROLL</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
@ -275,7 +266,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Reference Rule Area:</property>
|
<property name="label">Reference rule area:</property>
|
||||||
<property name="markup">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
@ -304,11 +295,11 @@
|
|||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="true">
|
<object class="wxStaticText" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -374,14 +365,152 @@
|
|||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer13</property>
|
<property name="name">bSizer41</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</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="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="drag_accept_files">0</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">Anchor footprint:</property>
|
||||||
|
<property name="markup">0</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_staticText2</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="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxChoice" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</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"></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="drag_accept_files">0</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="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size">-1,400</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_refAnchorFp</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"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip">Optional, use for precise and/or rotated placement.
Select reference rule area footprint, place corresponding
target rule area footprint(s).</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="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="true">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer13</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="false">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -442,6 +571,15 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="true">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer5</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
@ -512,6 +650,73 @@
|
|||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</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="checked">1</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="drag_accept_files">0</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">Restrict to routing connected within the area</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_cbCopyOnlyConnectedRouting</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="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip">Can be useful if unrelated tracks pass through the area</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="false">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -572,11 +777,11 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -702,11 +907,11 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -736,7 +941,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Remove locked items from target rule areas</property>
|
<property name="label">Include locked items</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
@ -757,7 +962,7 @@
|
|||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip">Copy from reference area + delete / update in target area if included</property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
@ -769,11 +974,11 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="false">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bottomButtonsSizer</property>
|
<property name="name">bottomButtonsSizer</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
@ -811,6 +1016,4 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</wxFormBuilder_Project>
|
</wxFormBuilder_Project>
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#define __DIALOG_MULTICHANNEL_REPEAT_LAYOUT__
|
#define __DIALOG_MULTICHANNEL_REPEAT_LAYOUT__
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <board.h>
|
||||||
#include <widgets/unit_binder.h>
|
#include <widgets/unit_binder.h>
|
||||||
|
|
||||||
#include <dialogs/dialog_multichannel_repeat_layout_base.h>
|
#include <dialogs/dialog_multichannel_repeat_layout_base.h>
|
||||||
@ -39,6 +40,7 @@ public:
|
|||||||
DIALOG_MULTICHANNEL_REPEAT_LAYOUT(
|
DIALOG_MULTICHANNEL_REPEAT_LAYOUT(
|
||||||
PCB_BASE_FRAME* aFrame,
|
PCB_BASE_FRAME* aFrame,
|
||||||
MULTICHANNEL_TOOL* aParentTool );
|
MULTICHANNEL_TOOL* aParentTool );
|
||||||
|
~DIALOG_MULTICHANNEL_REPEAT_LAYOUT();
|
||||||
|
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
@ -54,6 +56,7 @@ private:
|
|||||||
|
|
||||||
std::vector<TABLE_ENTRY> m_targetRAs;
|
std::vector<TABLE_ENTRY> m_targetRAs;
|
||||||
MULTICHANNEL_TOOL* m_parentTool;
|
MULTICHANNEL_TOOL* m_parentTool;
|
||||||
|
BOARD* m_board;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -11,24 +11,21 @@
|
|||||||
|
|
||||||
DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_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_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_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( 800,-1 ), wxDefaultSize );
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
||||||
|
|
||||||
m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_GeneralBoxSizer->SetMinSize( wxSize( 800,300 ) );
|
|
||||||
wxFlexGridSizer* fgSizer3;
|
wxFlexGridSizer* fgSizer3;
|
||||||
fgSizer3 = new wxFlexGridSizer( 0, 1, 0, 0 );
|
fgSizer3 = new wxFlexGridSizer( 0, 1, 0, 0 );
|
||||||
fgSizer3->AddGrowableCol( 0 );
|
fgSizer3->AddGrowableCol( 0 );
|
||||||
fgSizer3->AddGrowableRow( 2 );
|
fgSizer3->AddGrowableRow( 1 );
|
||||||
fgSizer3->SetFlexibleDirection( wxBOTH );
|
fgSizer3->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
fgSizer3->SetMinSize( wxSize( 800,300 ) );
|
fgSizer3->SetMinSize( wxSize( 600,-1 ) );
|
||||||
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Target areas:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Target areas:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText4->Wrap( -1 );
|
m_staticText4->Wrap( -1 );
|
||||||
fgSizer3->Add( m_staticText4, 0, wxALL, 5 );
|
fgSizer3->Add( m_staticText4, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_raGrid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_raGrid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||||
|
|
||||||
// Grid
|
// Grid
|
||||||
m_raGrid->CreateGrid( 1, 3 );
|
m_raGrid->CreateGrid( 1, 3 );
|
||||||
@ -39,8 +36,9 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(
|
|||||||
|
|
||||||
// Columns
|
// Columns
|
||||||
m_raGrid->AutoSizeColumns();
|
m_raGrid->AutoSizeColumns();
|
||||||
m_raGrid->EnableDragColMove( true );
|
m_raGrid->EnableDragColMove( false );
|
||||||
m_raGrid->EnableDragColSize( true );
|
m_raGrid->EnableDragColSize( true );
|
||||||
|
m_raGrid->SetColLabelSize( wxGRID_AUTOSIZE );
|
||||||
m_raGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
m_raGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
// Rows
|
// Rows
|
||||||
@ -58,7 +56,7 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(
|
|||||||
wxBoxSizer* bSizer4;
|
wxBoxSizer* bSizer4;
|
||||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Reference Rule Area:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Reference rule area:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText1->Wrap( -1 );
|
m_staticText1->Wrap( -1 );
|
||||||
bSizer4->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
bSizer4->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
@ -71,14 +69,44 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(
|
|||||||
|
|
||||||
fgSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
|
fgSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer41;
|
||||||
|
bSizer41 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Anchor footprint:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText2->Wrap( -1 );
|
||||||
|
bSizer41->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||||
|
|
||||||
|
wxArrayString m_refAnchorFpChoices;
|
||||||
|
m_refAnchorFp = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_refAnchorFpChoices, 0 );
|
||||||
|
m_refAnchorFp->SetSelection( 0 );
|
||||||
|
m_refAnchorFp->SetToolTip( _("Optional, use for precise and/or rotated placement.\nSelect reference rule area footprint, place corresponding\ntarget rule area footprint(s).") );
|
||||||
|
m_refAnchorFp->SetMaxSize( wxSize( -1,400 ) );
|
||||||
|
|
||||||
|
bSizer41->Add( m_refAnchorFp, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fgSizer3->Add( bSizer41, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer13;
|
wxBoxSizer* bSizer13;
|
||||||
bSizer13 = new wxBoxSizer( wxVERTICAL );
|
bSizer13 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_cbCopyPlacement = new wxCheckBox( this, wxID_ANY, _("Copy footprint placement"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbCopyPlacement = new wxCheckBox( this, wxID_ANY, _("Copy footprint placement"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer13->Add( m_cbCopyPlacement, 0, wxALL, 5 );
|
bSizer13->Add( m_cbCopyPlacement, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer5;
|
||||||
|
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_cbCopyRouting = new wxCheckBox( this, wxID_ANY, _("Copy routing"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbCopyRouting = new wxCheckBox( this, wxID_ANY, _("Copy routing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer13->Add( m_cbCopyRouting, 0, wxALL, 5 );
|
bSizer5->Add( m_cbCopyRouting, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_cbCopyOnlyConnectedRouting = new wxCheckBox( this, wxID_ANY, _("Restrict to routing connected within the area"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_cbCopyOnlyConnectedRouting->SetValue(true);
|
||||||
|
m_cbCopyOnlyConnectedRouting->SetToolTip( _("Can be useful if unrelated tracks pass through the area") );
|
||||||
|
|
||||||
|
bSizer5->Add( m_cbCopyOnlyConnectedRouting, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer13->Add( bSizer5, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_cbCopyOtherItems = new wxCheckBox( this, wxID_ANY, _("Copy other items"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbCopyOtherItems = new wxCheckBox( this, wxID_ANY, _("Copy other items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_cbCopyOtherItems->SetToolTip( _("Copy text, shapes, zones, and other items inside the source rule area") );
|
m_cbCopyOtherItems->SetToolTip( _("Copy text, shapes, zones, and other items inside the source rule area") );
|
||||||
@ -93,7 +121,9 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(
|
|||||||
m_cbGroupItems = new wxCheckBox( this, wxID_ANY, _("Group items with their target rule areas"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbGroupItems = new wxCheckBox( this, wxID_ANY, _("Group items with their target rule areas"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer13->Add( m_cbGroupItems, 0, wxALL, 5 );
|
bSizer13->Add( m_cbGroupItems, 0, wxALL, 5 );
|
||||||
|
|
||||||
m_cbIncludeLockedComponents = new wxCheckBox( this, wxID_ANY, _("Remove locked items from target rule areas"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbIncludeLockedComponents = new wxCheckBox( this, wxID_ANY, _("Include locked items"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_cbIncludeLockedComponents->SetToolTip( _("Copy from reference area + delete / update in target area if included") );
|
||||||
|
|
||||||
bSizer13->Add( m_cbIncludeLockedComponents, 0, wxALL, 5 );
|
bSizer13->Add( m_cbIncludeLockedComponents, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
@ -118,12 +148,9 @@ DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE(
|
|||||||
fgSizer3->Add( bottomButtonsSizer, 0, wxEXPAND|wxLEFT, 5 );
|
fgSizer3->Add( bottomButtonsSizer, 0, wxEXPAND|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_GeneralBoxSizer->Add( fgSizer3, 1, wxEXPAND, 5 );
|
this->SetSizer( fgSizer3 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( m_GeneralBoxSizer );
|
|
||||||
this->Layout();
|
this->Layout();
|
||||||
m_GeneralBoxSizer->Fit( this );
|
fgSizer3->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::OnInitDlg ) );
|
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE::OnInitDlg ) );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -19,6 +19,7 @@
|
|||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/grid.h>
|
#include <wx/grid.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/choice.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
@ -31,15 +32,17 @@
|
|||||||
class DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE : public DIALOG_SHIM
|
class DIALOG_MULTICHANNEL_REPEAT_LAYOUT_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
wxBoxSizer* m_GeneralBoxSizer;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxStaticText* m_staticText4;
|
wxStaticText* m_staticText4;
|
||||||
wxGrid* m_raGrid;
|
wxGrid* m_raGrid;
|
||||||
wxStaticText* m_staticText1;
|
wxStaticText* m_staticText1;
|
||||||
wxStaticText* m_refRAName;
|
wxStaticText* m_refRAName;
|
||||||
|
wxStaticText* m_staticText2;
|
||||||
|
wxChoice* m_refAnchorFp;
|
||||||
wxCheckBox* m_cbCopyPlacement;
|
wxCheckBox* m_cbCopyPlacement;
|
||||||
wxCheckBox* m_cbCopyRouting;
|
wxCheckBox* m_cbCopyRouting;
|
||||||
|
wxCheckBox* m_cbCopyOnlyConnectedRouting;
|
||||||
wxCheckBox* m_cbCopyOtherItems;
|
wxCheckBox* m_cbCopyOtherItems;
|
||||||
wxCheckBox* m_cbIncludeOffRAComponents;
|
wxCheckBox* m_cbIncludeOffRAComponents;
|
||||||
wxCheckBox* m_cbGroupItems;
|
wxCheckBox* m_cbGroupItems;
|
||||||
|
@ -528,7 +528,6 @@ int MULTICHANNEL_TOOL::RepeatLayout( const TOOL_EVENT& aEvent, ZONE* aRefZone )
|
|||||||
int totalCopied = 0;
|
int totalCopied = 0;
|
||||||
|
|
||||||
BOARD_COMMIT commit( GetManager(), true );
|
BOARD_COMMIT commit( GetManager(), true );
|
||||||
|
|
||||||
for( auto& targetArea : m_areas.m_compatMap )
|
for( auto& targetArea : m_areas.m_compatMap )
|
||||||
{
|
{
|
||||||
if( !targetArea.second.m_doCopy )
|
if( !targetArea.second.m_doCopy )
|
||||||
@ -541,9 +540,8 @@ int MULTICHANNEL_TOOL::RepeatLayout( const TOOL_EVENT& aEvent, ZONE* aRefZone )
|
|||||||
if( !targetArea.second.m_isOk )
|
if( !targetArea.second.m_isOk )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( !copyRuleAreaContents( targetArea.second.m_matchingComponents, &commit, m_areas.m_refRA, targetArea.first,
|
||||||
if( !copyRuleAreaContents( targetArea.second.m_matchingComponents, &commit, m_areas.m_refRA,
|
m_areas.m_options, targetArea.second.m_affectedItems,
|
||||||
targetArea.first, m_areas.m_options, targetArea.second.m_affectedItems,
|
|
||||||
targetArea.second.m_groupableItems ) )
|
targetArea.second.m_groupableItems ) )
|
||||||
{
|
{
|
||||||
auto errMsg = wxString::Format(
|
auto errMsg = wxString::Format(
|
||||||
@ -561,6 +559,7 @@ int MULTICHANNEL_TOOL::RepeatLayout( const TOOL_EVENT& aEvent, ZONE* aRefZone )
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
totalCopied++;
|
totalCopied++;
|
||||||
|
wxSafeYield();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_areas.m_options.m_groupItems )
|
if( m_areas.m_options.m_groupItems )
|
||||||
@ -616,44 +615,17 @@ wxString MULTICHANNEL_TOOL::stripComponentIndex( const wxString& aRef ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int MULTICHANNEL_TOOL::findRoutedConnections( std::set<BOARD_ITEM*>& aOutput,
|
int MULTICHANNEL_TOOL::findRouting( std::set<BOARD_CONNECTED_ITEM*>& aOutput,
|
||||||
std::shared_ptr<CONNECTIVITY_DATA> aConnectivity,
|
std::shared_ptr<CONNECTIVITY_DATA> aConnectivity,
|
||||||
const SHAPE_POLY_SET& aRAPoly,
|
const SHAPE_POLY_SET& aRAPoly,
|
||||||
RULE_AREA* aRA,
|
RULE_AREA* aRA,
|
||||||
FOOTPRINT* aFp,
|
|
||||||
const REPEAT_LAYOUT_OPTIONS& aOpts ) const
|
const REPEAT_LAYOUT_OPTIONS& aOpts ) const
|
||||||
{
|
{
|
||||||
std::set<BOARD_ITEM*> conns;
|
|
||||||
|
|
||||||
for( PAD* pad : aFp->Pads() )
|
|
||||||
{
|
|
||||||
auto connectedItems = aConnectivity->GetConnectedItems( pad, EXCLUDE_ZONES | IGNORE_NETS );
|
|
||||||
|
|
||||||
for( BOARD_CONNECTED_ITEM* item : connectedItems )
|
|
||||||
conns.insert( item );
|
|
||||||
}
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
for( BOARD_ITEM* item : conns )
|
|
||||||
{
|
|
||||||
// fixme: respect layer sets assigned to each RA
|
|
||||||
|
|
||||||
if( item->Type() == PCB_PAD_T )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
std::shared_ptr<SHAPE> effShape = item->GetEffectiveShape( item->GetLayer() );
|
|
||||||
|
|
||||||
if( effShape->Collide( &aRAPoly, 0 ) )
|
|
||||||
{
|
|
||||||
aOutput.insert( item );
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The user also will consider tracks and vias that are inside the source area but
|
// The user also will consider tracks and vias that are inside the source area but
|
||||||
// not connected to any of the source pads to count as "routing" (e.g. stitching vias)
|
// not connected to any of the source pads to count as "routing" (e.g. stitching vias)
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
PCBEXPR_COMPILER compiler( new PCBEXPR_UNIT_RESOLVER );
|
PCBEXPR_COMPILER compiler( new PCBEXPR_UNIT_RESOLVER );
|
||||||
PCBEXPR_UCODE ucode;
|
PCBEXPR_UCODE ucode;
|
||||||
PCBEXPR_CONTEXT ctx, preflightCtx;
|
PCBEXPR_CONTEXT ctx, preflightCtx;
|
||||||
@ -679,7 +651,7 @@ int MULTICHANNEL_TOOL::findRoutedConnections( std::set<BOARD_ITEM*>&
|
|||||||
aRA->m_area->GetZoneName() );
|
aRA->m_area->GetZoneName() );
|
||||||
|
|
||||||
auto testAndAdd =
|
auto testAndAdd =
|
||||||
[&]( BOARD_ITEM* aItem )
|
[&]( BOARD_CONNECTED_ITEM* aItem )
|
||||||
{
|
{
|
||||||
if( aOutput.contains( aItem ) )
|
if( aOutput.contains( aItem ) )
|
||||||
return;
|
return;
|
||||||
@ -707,10 +679,8 @@ int MULTICHANNEL_TOOL::findRoutedConnections( std::set<BOARD_ITEM*>&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatches,
|
bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatches, BOARD_COMMIT* aCommit,
|
||||||
BOARD_COMMIT* aCommit,
|
RULE_AREA* aRefArea, RULE_AREA* aTargetArea, REPEAT_LAYOUT_OPTIONS aOpts,
|
||||||
RULE_AREA* aRefArea, RULE_AREA* aTargetArea,
|
|
||||||
REPEAT_LAYOUT_OPTIONS aOpts,
|
|
||||||
std::unordered_set<BOARD_ITEM*>& aAffectedItems,
|
std::unordered_set<BOARD_ITEM*>& aAffectedItems,
|
||||||
std::unordered_set<BOARD_ITEM*>& aGroupableItems )
|
std::unordered_set<BOARD_ITEM*>& aGroupableItems )
|
||||||
{
|
{
|
||||||
@ -718,7 +688,28 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
SHAPE_LINE_CHAIN refOutline = aRefArea->m_area->Outline()->COutline( 0 );
|
SHAPE_LINE_CHAIN refOutline = aRefArea->m_area->Outline()->COutline( 0 );
|
||||||
SHAPE_LINE_CHAIN targetOutline = aTargetArea->m_area->Outline()->COutline( 0 );
|
SHAPE_LINE_CHAIN targetOutline = aTargetArea->m_area->Outline()->COutline( 0 );
|
||||||
|
|
||||||
|
FOOTPRINT* targetAnchorFp = nullptr;
|
||||||
VECTOR2I disp = aTargetArea->m_center - aRefArea->m_center;
|
VECTOR2I disp = aTargetArea->m_center - aRefArea->m_center;
|
||||||
|
EDA_ANGLE rot = EDA_ANGLE( 0 );
|
||||||
|
if( aOpts.m_anchorFp )
|
||||||
|
{
|
||||||
|
for( auto& fpPair : aMatches )
|
||||||
|
{
|
||||||
|
if( fpPair.first->GetReference() == aOpts.m_anchorFp->GetReference() )
|
||||||
|
targetAnchorFp = fpPair.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( targetAnchorFp )
|
||||||
|
{
|
||||||
|
VECTOR2I oldpos = aOpts.m_anchorFp->GetPosition();
|
||||||
|
rot = EDA_ANGLE( targetAnchorFp->GetOrientationDegrees() - aOpts.m_anchorFp->GetOrientationDegrees() );
|
||||||
|
aOpts.m_anchorFp->Rotate( VECTOR2( 0, 0 ), EDA_ANGLE( rot ) );
|
||||||
|
oldpos = aOpts.m_anchorFp->GetPosition();
|
||||||
|
VECTOR2I newpos = targetAnchorFp->GetPosition();
|
||||||
|
disp = newpos - oldpos;
|
||||||
|
aOpts.m_anchorFp->Rotate( VECTOR2( 0, 0 ), EDA_ANGLE( -rot ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SHAPE_POLY_SET refPoly;
|
SHAPE_POLY_SET refPoly;
|
||||||
refPoly.AddOutline( refOutline );
|
refPoly.AddOutline( refOutline );
|
||||||
@ -727,6 +718,7 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
SHAPE_POLY_SET targetPoly;
|
SHAPE_POLY_SET targetPoly;
|
||||||
|
|
||||||
SHAPE_LINE_CHAIN newTargetOutline( refOutline );
|
SHAPE_LINE_CHAIN newTargetOutline( refOutline );
|
||||||
|
newTargetOutline.Rotate( rot, VECTOR2( 0, 0 ) );
|
||||||
newTargetOutline.Move( disp );
|
newTargetOutline.Move( disp );
|
||||||
targetPoly.AddOutline( newTargetOutline );
|
targetPoly.AddOutline( newTargetOutline );
|
||||||
targetPoly.CacheTriangulation( false );
|
targetPoly.CacheTriangulation( false );
|
||||||
@ -740,26 +732,32 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
|
|
||||||
if( aOpts.m_copyRouting )
|
if( aOpts.m_copyRouting )
|
||||||
{
|
{
|
||||||
std::set<BOARD_ITEM*> refRouting;
|
std::set<BOARD_CONNECTED_ITEM*> refRouting;
|
||||||
std::set<BOARD_ITEM*> targetRouting;
|
std::set<BOARD_CONNECTED_ITEM*> targetRouting;
|
||||||
|
|
||||||
wxLogTrace( traceMultichannelTool, wxT("copying routing: %d fps\n"), (int) aMatches.size() );
|
wxLogTrace( traceMultichannelTool, wxT("copying routing: %d fps\n"), (int) aMatches.size() );
|
||||||
|
|
||||||
|
std::set<int> refc;
|
||||||
|
std::set<int> targc;
|
||||||
|
|
||||||
for( auto& fpPair : aMatches )
|
for( auto& fpPair : aMatches )
|
||||||
{
|
{
|
||||||
findRoutedConnections( targetRouting, connectivity, targetPoly, aTargetArea,
|
for( PAD* pad : fpPair.first->Pads() )
|
||||||
fpPair.second, aOpts );
|
refc.insert( pad->GetNetCode() );
|
||||||
findRoutedConnections( refRouting, connectivity, refPoly, aRefArea, fpPair.first,
|
|
||||||
aOpts );
|
|
||||||
|
|
||||||
wxLogTrace( traceMultichannelTool, wxT("target-routes %d\n"), (int) targetRouting.size() );
|
for( PAD* pad : fpPair.second->Pads() )
|
||||||
|
targc.insert( pad->GetNetCode() );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( BOARD_ITEM* item : targetRouting )
|
findRouting( targetRouting, connectivity, targetPoly, aTargetArea, aOpts );
|
||||||
|
findRouting( refRouting, connectivity, refPoly, aRefArea, aOpts );
|
||||||
|
|
||||||
|
for( BOARD_CONNECTED_ITEM* item : targetRouting )
|
||||||
{
|
{
|
||||||
if( item->IsLocked() && !aOpts.m_includeLockedItems )
|
if( item->IsLocked() && !aOpts.m_includeLockedItems )
|
||||||
continue;
|
continue;
|
||||||
|
if( aOpts.m_connectedRoutingOnly && !targc.contains( item->GetNetCode() ) )
|
||||||
|
continue;
|
||||||
// item already removed
|
// item already removed
|
||||||
if( aCommit->GetStatus( item ) != 0 )
|
if( aCommit->GetStatus( item ) != 0 )
|
||||||
continue;
|
continue;
|
||||||
@ -771,21 +769,23 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( BOARD_ITEM* item : refRouting )
|
for( BOARD_CONNECTED_ITEM* item : refRouting )
|
||||||
{
|
{
|
||||||
|
if( item->IsLocked() && !aOpts.m_includeLockedItems )
|
||||||
|
continue;
|
||||||
|
if( aOpts.m_connectedRoutingOnly && !refc.contains( item->GetNetCode() ) )
|
||||||
|
continue;
|
||||||
if( !aRefArea->m_area->GetLayerSet().Contains( item->GetLayer() ) )
|
if( !aRefArea->m_area->GetLayerSet().Contains( item->GetLayer() ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( !aTargetArea->m_area->GetLayerSet().Contains( item->GetLayer() ) )
|
if( !aTargetArea->m_area->GetLayerSet().Contains( item->GetLayer() ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BOARD_ITEM* copied = static_cast<BOARD_ITEM*>( item->Clone() );
|
BOARD_CONNECTED_ITEM* copied = static_cast<BOARD_CONNECTED_ITEM*>( item->Clone() );
|
||||||
|
|
||||||
if( item->Type() == PCB_VIA_T )
|
fixupNet( item, copied, aMatches );
|
||||||
{
|
|
||||||
fixupNet( static_cast<BOARD_CONNECTED_ITEM*>( item ), static_cast<BOARD_CONNECTED_ITEM*>( copied ),
|
copied->Rotate( VECTOR2( 0, 0 ), rot );
|
||||||
aMatches );
|
|
||||||
}
|
|
||||||
copied->Move( disp );
|
copied->Move( disp );
|
||||||
copied->SetParentGroup( nullptr );
|
copied->SetParentGroup( nullptr );
|
||||||
const_cast<KIID&>( copied->m_Uuid ) = KIID();
|
const_cast<KIID&>( copied->m_Uuid ) = KIID();
|
||||||
@ -851,6 +851,9 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
&& item->GetParent()->Type() == PCB_FOOTPRINT_T )
|
&& item->GetParent()->Type() == PCB_FOOTPRINT_T )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( item->IsLocked() && !aOpts.m_includeLockedItems )
|
||||||
|
continue;
|
||||||
|
|
||||||
BOARD_ITEM* copied = nullptr;
|
BOARD_ITEM* copied = nullptr;
|
||||||
|
|
||||||
if( item->Type() != PCB_ZONE_T )
|
if( item->Type() != PCB_ZONE_T )
|
||||||
@ -900,6 +903,7 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
copied->ClearFlags();
|
copied->ClearFlags();
|
||||||
copied->SetParentGroup( nullptr );
|
copied->SetParentGroup( nullptr );
|
||||||
const_cast<KIID&>( copied->m_Uuid ) = KIID();
|
const_cast<KIID&>( copied->m_Uuid ) = KIID();
|
||||||
|
copied->Rotate( VECTOR2( 0, 0 ), rot );
|
||||||
copied->Move( disp );
|
copied->Move( disp );
|
||||||
aGroupableItems.insert( copied );
|
aGroupableItems.insert( copied );
|
||||||
aCommit->Add( copied );
|
aCommit->Add( copied );
|
||||||
@ -907,11 +911,6 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aTargetArea->m_area->RemoveAllContours();
|
|
||||||
aTargetArea->m_area->AddPolygon( newTargetOutline );
|
|
||||||
aTargetArea->m_area->UnHatchBorder();
|
|
||||||
aTargetArea->m_area->HatchBorder();
|
|
||||||
|
|
||||||
if( aOpts.m_copyPlacement )
|
if( aOpts.m_copyPlacement )
|
||||||
{
|
{
|
||||||
for( auto& fpPair : aMatches )
|
for( auto& fpPair : aMatches )
|
||||||
@ -943,9 +942,9 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
|
|
||||||
targetFP->SetLayerAndFlip( refFP->GetLayer() );
|
targetFP->SetLayerAndFlip( refFP->GetLayer() );
|
||||||
targetFP->SetOrientation( refFP->GetOrientation() );
|
targetFP->SetOrientation( refFP->GetOrientation() );
|
||||||
VECTOR2I targetPos = refFP->GetPosition() + disp;
|
targetFP->SetPosition( refFP->GetPosition() );
|
||||||
targetFP->SetPosition( targetPos );
|
targetFP->Rotate( VECTOR2( 0, 0 ), rot );
|
||||||
|
targetFP->Move( disp );
|
||||||
for( PCB_FIELD* refField : refFP->GetFields() )
|
for( PCB_FIELD* refField : refFP->GetFields() )
|
||||||
{
|
{
|
||||||
if( !refField->IsVisible() )
|
if( !refField->IsVisible() )
|
||||||
@ -955,7 +954,9 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
wxCHECK2( targetField, continue );
|
wxCHECK2( targetField, continue );
|
||||||
|
|
||||||
targetField->SetAttributes( refField->GetAttributes() );
|
targetField->SetAttributes( refField->GetAttributes() );
|
||||||
targetField->SetPosition( refField->GetPosition() + disp );
|
targetField->SetPosition( refField->GetPosition() );
|
||||||
|
targetField->Rotate( VECTOR2( 0, 0 ), rot );
|
||||||
|
targetField->Move( disp );
|
||||||
targetField->SetIsKnockout( refField->IsKnockout() );
|
targetField->SetIsKnockout( refField->IsKnockout() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -964,11 +965,16 @@ bool MULTICHANNEL_TOOL::copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatche
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aTargetArea->m_area->RemoveAllContours();
|
||||||
|
aTargetArea->m_area->AddPolygon( newTargetOutline );
|
||||||
|
aTargetArea->m_area->UnHatchBorder();
|
||||||
|
aTargetArea->m_area->HatchBorder();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Attempts to modify the assigned net of copied items, especially intended for zones and vias
|
* @brief Attempts to make sure copied items are assigned the right net
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void MULTICHANNEL_TOOL::fixupNet( BOARD_CONNECTED_ITEM* aRef, BOARD_CONNECTED_ITEM* aTarget,
|
void MULTICHANNEL_TOOL::fixupNet( BOARD_CONNECTED_ITEM* aRef, BOARD_CONNECTED_ITEM* aTarget,
|
||||||
|
@ -48,6 +48,7 @@ enum class REPEAT_LAYOUT_EDGE_MODE
|
|||||||
struct REPEAT_LAYOUT_OPTIONS
|
struct REPEAT_LAYOUT_OPTIONS
|
||||||
{
|
{
|
||||||
bool m_copyRouting = true;
|
bool m_copyRouting = true;
|
||||||
|
bool m_connectedRoutingOnly = false;
|
||||||
bool m_copyPlacement = true;
|
bool m_copyPlacement = true;
|
||||||
bool m_copyOtherItems = true;
|
bool m_copyOtherItems = true;
|
||||||
bool m_groupItems = false;
|
bool m_groupItems = false;
|
||||||
@ -55,6 +56,7 @@ struct REPEAT_LAYOUT_OPTIONS
|
|||||||
bool m_includeLockedItems = true;
|
bool m_includeLockedItems = true;
|
||||||
bool m_keepOldRouting = false;
|
bool m_keepOldRouting = false;
|
||||||
bool m_copyOnlyMatchingRAShapes = false;
|
bool m_copyOnlyMatchingRAShapes = false;
|
||||||
|
FOOTPRINT* m_anchorFp = nullptr;
|
||||||
REPEAT_LAYOUT_EDGE_MODE m_edgeMode = REPEAT_LAYOUT_EDGE_MODE::INSIDE;
|
REPEAT_LAYOUT_EDGE_MODE m_edgeMode = REPEAT_LAYOUT_EDGE_MODE::INSIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -144,9 +146,8 @@ private:
|
|||||||
bool copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatches, BOARD_COMMIT* aCommit, RULE_AREA* aRefArea,
|
bool copyRuleAreaContents( TMATCH::COMPONENT_MATCHES& aMatches, BOARD_COMMIT* aCommit, RULE_AREA* aRefArea,
|
||||||
RULE_AREA* aTargetArea, REPEAT_LAYOUT_OPTIONS aOpts, std::unordered_set<BOARD_ITEM*>& aAffectedItems,
|
RULE_AREA* aTargetArea, REPEAT_LAYOUT_OPTIONS aOpts, std::unordered_set<BOARD_ITEM*>& aAffectedItems,
|
||||||
std::unordered_set<BOARD_ITEM*>& aGroupableItems );
|
std::unordered_set<BOARD_ITEM*>& aGroupableItems );
|
||||||
int findRoutedConnections( std::set<BOARD_ITEM*>& aOutput,
|
int findRouting( std::set<BOARD_CONNECTED_ITEM*>& aOutput, std::shared_ptr<CONNECTIVITY_DATA> aConnectivity,
|
||||||
std::shared_ptr<CONNECTIVITY_DATA> aConnectivity,
|
const SHAPE_POLY_SET& aRAPoly, RULE_AREA* aRA,
|
||||||
const SHAPE_POLY_SET& aRAPoly, RULE_AREA* aRA, FOOTPRINT* aFp,
|
|
||||||
const REPEAT_LAYOUT_OPTIONS& aOpts ) const;
|
const REPEAT_LAYOUT_OPTIONS& aOpts ) const;
|
||||||
void fixupNet( BOARD_CONNECTED_ITEM* aRef, BOARD_CONNECTED_ITEM* aTarget,
|
void fixupNet( BOARD_CONNECTED_ITEM* aRef, BOARD_CONNECTED_ITEM* aTarget,
|
||||||
TMATCH::COMPONENT_MATCHES& aComponentMatches );
|
TMATCH::COMPONENT_MATCHES& aComponentMatches );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user