From ff3f229871071b65422ce432391e5dcc3ab1f273 Mon Sep 17 00:00:00 2001 From: Andrzej Wolski Date: Sat, 17 Mar 2018 14:51:16 +0100 Subject: [PATCH] Decouple vias from tracks in selection filter --- pcbnew/block.cpp | 22 +- pcbnew/dialogs/dialog_block_options.cpp | 2 + pcbnew/dialogs/dialog_block_options.h | 1 + pcbnew/dialogs/dialog_block_options_base.cpp | 39 +- pcbnew/dialogs/dialog_block_options_base.fbp | 1712 ++++++++++-------- pcbnew/dialogs/dialog_block_options_base.h | 9 +- pcbnew/tools/selection_tool.cpp | 6 +- qa/common/mocks.cpp | 1 + 8 files changed, 971 insertions(+), 821 deletions(-) diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 95378846c2..b45cfea592 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -334,19 +334,19 @@ void PCB_EDIT_FRAME::Block_SelectItems() } // Add tracks and vias - if( blockOpts.includeTracks ) + for( auto PtStruct : m_Pcb->Tracks() ) { - for( TRACK* track = m_Pcb->m_Track; track != NULL; track = track->Next() ) + if( !m_Pcb->IsLayerVisible( PtStruct->GetLayer() ) && !blockOpts.includeItemsOnInvisibleLayers ) + continue; + + if( !( blockOpts.includeTracks && PtStruct->Type() == PCB_TRACE_T ) && + !( blockOpts.includeVias && PtStruct->Type() == PCB_VIA_T) ) + continue; + + if( PtStruct->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) ) { - if( track->HitTest( GetScreen()->m_BlockLocate, selectOnlyComplete ) ) - { - if( blockOpts.includeItemsOnInvisibleLayers - || m_Pcb->IsLayerVisible( track->GetLayer() ) ) - { - picker.SetItem( track ); - itemsList->PushItem( picker ); - } - } + picker.SetItem ( PtStruct ); + itemsList->PushItem( picker ); } } diff --git a/pcbnew/dialogs/dialog_block_options.cpp b/pcbnew/dialogs/dialog_block_options.cpp index dcf611ceb4..7b46d98ed3 100644 --- a/pcbnew/dialogs/dialog_block_options.cpp +++ b/pcbnew/dialogs/dialog_block_options.cpp @@ -49,6 +49,7 @@ DIALOG_BLOCK_OPTIONS::DIALOG_BLOCK_OPTIONS( PCB_BASE_FRAME* aParent, m_IncludeLockedModules->Disable(); m_Include_Tracks->SetValue( m_options.includeTracks ); + m_Include_Vias->SetValue( m_options.includeVias ); m_Include_Zones->SetValue( m_options.includeZones ); m_Include_Draw_Items->SetValue( m_options.includeItemsOnTechLayers ); m_Include_Edges_Items->SetValue( m_options.includeBoardOutlineLayer ); @@ -77,6 +78,7 @@ void DIALOG_BLOCK_OPTIONS::ExecuteCommand( wxCommandEvent& event ) m_options.includeModules = m_Include_Modules->GetValue(); m_options.includeLockedModules = m_IncludeLockedModules->GetValue(); m_options.includeTracks = m_Include_Tracks->GetValue(); + m_options.includeVias = m_Include_Vias->GetValue(); m_options.includeZones = m_Include_Zones->GetValue(); m_options.includeItemsOnTechLayers = m_Include_Draw_Items->GetValue(); m_options.includeBoardOutlineLayer = m_Include_Edges_Items->GetValue(); diff --git a/pcbnew/dialogs/dialog_block_options.h b/pcbnew/dialogs/dialog_block_options.h index bdefe086ab..ecccbccd79 100644 --- a/pcbnew/dialogs/dialog_block_options.h +++ b/pcbnew/dialogs/dialog_block_options.h @@ -41,6 +41,7 @@ public: bool includeModules = true; bool includeLockedModules = true; bool includeTracks = true; + bool includeVias = true; bool includeZones = true; bool includeItemsOnTechLayers = true; bool includeBoardOutlineLayer = true; diff --git a/pcbnew/dialogs/dialog_block_options_base.cpp b/pcbnew/dialogs/dialog_block_options_base.cpp index 7926ee0d25..b1315672ff 100644 --- a/pcbnew/dialogs/dialog_block_options_base.cpp +++ b/pcbnew/dialogs/dialog_block_options_base.cpp @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version May 6 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "dialog_block_options_base.h" @@ -19,6 +19,11 @@ DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindow wxStaticBoxSizer* sbSizer1; sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 3, 1, 0, 0 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxGridSizer* gSizer1; gSizer1 = new wxGridSizer( 4, 2, 3, 3 ); @@ -40,20 +45,32 @@ DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindow m_Include_Edges_Items = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Include &board outline layer"), wxDefaultPosition, wxDefaultSize, 0 ); gSizer1->Add( m_Include_Edges_Items, 0, 0, 5 ); + m_Include_Vias = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Include &vias"), wxDefaultPosition, wxDefaultSize, 0 ); + gSizer1->Add( m_Include_Vias, 0, 0, 5 ); + m_Include_Zones = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Include &zones"), wxDefaultPosition, wxDefaultSize, 0 ); gSizer1->Add( m_Include_Zones, 0, 0, 5 ); - m_DrawBlockItems = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Draw &selected items while moving"), wxDefaultPosition, wxDefaultSize, 0 ); - gSizer1->Add( m_DrawBlockItems, 0, 0, 5 ); - - sbSizer1->Add( gSizer1, 1, wxALL|wxEXPAND, 5 ); + fgSizer1->Add( gSizer1, 1, wxALL|wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + fgSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxGridSizer* gSizer2; + gSizer2 = new wxGridSizer( 1, 2, 3, 3 ); m_checkBoxIncludeInvisible = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Include &items on invisible layers"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_checkBoxIncludeInvisible, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + gSizer2->Add( m_checkBoxIncludeInvisible, 0, 0, 5 ); + + m_DrawBlockItems = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Draw &selected items while moving"), wxDefaultPosition, wxDefaultSize, 0 ); + gSizer2->Add( m_DrawBlockItems, 0, 0, 5 ); + + + fgSizer1->Add( gSizer2, 1, wxALL|wxEXPAND, 5 ); + + + sbSizer1->Add( fgSizer1, 1, wxEXPAND, 5 ); bSizerMain->Add( sbSizer1, 1, wxALL|wxEXPAND, 5 ); @@ -81,9 +98,10 @@ DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, wxWindow m_Include_Draw_Items->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Tracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Edges_Items->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); + m_Include_Vias->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Zones->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); - m_DrawBlockItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_checkBoxIncludeInvisible->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); + m_DrawBlockItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::OnCancel ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::ExecuteCommand ), NULL, this ); } @@ -97,9 +115,10 @@ DIALOG_BLOCK_OPTIONS_BASE::~DIALOG_BLOCK_OPTIONS_BASE() m_Include_Draw_Items->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Tracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Edges_Items->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); + m_Include_Vias->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_Include_Zones->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); - m_DrawBlockItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_checkBoxIncludeInvisible->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); + m_DrawBlockItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::checkBoxClicked ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::OnCancel ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BLOCK_OPTIONS_BASE::ExecuteCommand ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_block_options_base.fbp b/pcbnew/dialogs/dialog_block_options_base.fbp index 4924ed02bb..489b1f22a9 100644 --- a/pcbnew/dialogs/dialog_block_options_base.fbp +++ b/pcbnew/dialogs/dialog_block_options_base.fbp @@ -108,549 +108,743 @@ 5 - wxALL|wxEXPAND + wxEXPAND 1 - - 2 - 3 + + 1 + wxBOTH + + + 0 - gSizer1 + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED none - 4 - 3 - + 3 + 0 + 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &footprints - - 0 - - - 0 - - 1 - m_Include_Modules - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include t&ext items - - 0 - - - 0 - - 1 - m_Include_PcbTextes - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &locked footprints - - 0 - - - 0 - - 1 - m_IncludeLockedModules - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &drawings - - 0 - - - 0 - - 1 - m_Include_Draw_Items - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &tracks - - 0 - - - 0 - - 1 - m_Include_Tracks - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &board outline layer - - 0 - - - 0 + wxALL|wxEXPAND + 1 + + 2 + 3 - 1 - m_Include_Edges_Items - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - + gSizer1 + none + 4 + 3 + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &footprints + + 0 + + + 0 + + 1 + m_Include_Modules + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include t&ext items + + 0 + + + 0 + + 1 + m_Include_PcbTextes + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &locked footprints + + 0 + + + 0 + + 1 + m_IncludeLockedModules + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &drawings + + 0 + + + 0 + + 1 + m_Include_Draw_Items + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &tracks + + 0 + + + 0 + + 1 + m_Include_Tracks + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &board outline layer + + 0 + + + 0 + + 1 + m_Include_Edges_Items + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &vias + + 0 + + + 0 + + 1 + m_Include_Vias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &zones + + 0 + + + 0 + + 1 + m_Include_Zones + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + - + 5 - + wxEXPAND | wxALL 0 - + 1 1 1 @@ -664,7 +858,6 @@ 1 0 - 0 1 1 @@ -679,7 +872,6 @@ 0 0 wxID_ANY - Include &zones 0 @@ -687,7 +879,7 @@ 0 1 - m_Include_Zones + m_staticline1 1 @@ -697,19 +889,14 @@ Resizable 1 - + wxLI_HORIZONTAL 0 - - wxFILTER_NONE - wxDefaultValidator - - checkBoxClicked @@ -734,265 +921,198 @@ - + 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Draw &selected items while moving - - 0 - - - 0 + wxALL|wxEXPAND + 1 + + 2 + 3 - 1 - m_DrawBlockItems - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - + gSizer2 + none + 1 + 3 + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Include &items on invisible layers + + 0 + + + 0 + + 1 + m_checkBoxIncludeInvisible + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Draw &selected items while moving + + 0 + + + 0 + + 1 + m_DrawBlockItems + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + checkBoxClicked + + + + + + + + + + + + + + + + + + + + + + + + - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Include &items on invisible layers - - 0 - - - 0 - - 1 - m_checkBoxIncludeInvisible - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - checkBoxClicked - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pcbnew/dialogs/dialog_block_options_base.h b/pcbnew/dialogs/dialog_block_options_base.h index 3ff92ec286..6e8c51f8af 100644 --- a/pcbnew/dialogs/dialog_block_options_base.h +++ b/pcbnew/dialogs/dialog_block_options_base.h @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version May 6 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #ifndef __DIALOG_BLOCK_OPTIONS_BASE_H__ @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include @@ -41,10 +43,11 @@ class DIALOG_BLOCK_OPTIONS_BASE : public DIALOG_SHIM wxCheckBox* m_Include_Draw_Items; wxCheckBox* m_Include_Tracks; wxCheckBox* m_Include_Edges_Items; + wxCheckBox* m_Include_Vias; wxCheckBox* m_Include_Zones; - wxCheckBox* m_DrawBlockItems; wxStaticLine* m_staticline1; wxCheckBox* m_checkBoxIncludeInvisible; + wxCheckBox* m_DrawBlockItems; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Cancel; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 14e00273e5..04ce09f9f0 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1267,11 +1267,15 @@ static bool itemIsIncludedByFilter( const BOARD_ITEM& aItem, break; } case PCB_TRACE_T: - case PCB_VIA_T: { include = aBlockOpts.includeTracks; break; } + case PCB_VIA_T: + { + include = aBlockOpts.includeVias; + break; + } case PCB_ZONE_AREA_T: { include = aBlockOpts.includeZones; diff --git a/qa/common/mocks.cpp b/qa/common/mocks.cpp index 0494b78b6b..aa4b159bcb 100644 --- a/qa/common/mocks.cpp +++ b/qa/common/mocks.cpp @@ -295,6 +295,7 @@ DIALOG_BLOCK_OPTIONS_BASE::DIALOG_BLOCK_OPTIONS_BASE( wxWindow* parent, m_IncludeLockedModules = nullptr; m_Include_Draw_Items = nullptr; m_Include_Tracks = nullptr; + m_Include_Vias = nullptr; m_Include_Edges_Items = nullptr; m_Include_Zones = nullptr; m_DrawBlockItems = nullptr;