Remove debugging and add grouping box for Nets & Net Filters.
Fixes: lp:1782766 * https://bugs.launchpad.net/kicad/+bug/1782766 (cherry picked from commit a75f376)
This commit is contained in:
parent
7cce283fea
commit
d32fb68fa9
|
@ -31,75 +31,66 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
||||||
wxBoxSizer* m_OptionsBoxSizer;
|
wxBoxSizer* m_OptionsBoxSizer;
|
||||||
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxBoxSizer* m_layerSizer;
|
wxStaticBoxSizer* sbSizer2;
|
||||||
m_layerSizer = new wxBoxSizer( wxVERTICAL );
|
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layer") ), wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextLayers = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_layers = new wxDataViewListCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxSUNKEN_BORDER );
|
||||||
m_staticTextLayers->Wrap( -1 );
|
m_layers->SetMinSize( wxSize( 80,-1 ) );
|
||||||
m_layerSizer->Add( m_staticTextLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxSUNKEN_BORDER );
|
sbSizer2->Add( m_layers, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
m_layerSizer->Add( m_layers, 1, wxEXPAND|wxRIGHT, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
|
m_OptionsBoxSizer->Add( sbSizer2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizerNets;
|
wxStaticBoxSizer* sbSizer3;
|
||||||
bSizerNets = new wxBoxSizer( wxVERTICAL );
|
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net") ), wxHORIZONTAL );
|
||||||
|
|
||||||
m_staticTextNets = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_ListNetNameSelection = new wxListBox( sbSizer3->GetStaticBox(), ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||||
m_staticTextNets->Wrap( -1 );
|
sbSizer3->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
bSizerNets->Add( m_staticTextNets, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
|
||||||
bSizerNets->Add( m_ListNetNameSelection, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
m_OptionsBoxSizer->Add( bSizerNets, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* bFilteringSizer;
|
wxBoxSizer* bFilteringSizer;
|
||||||
bFilteringSizer = new wxBoxSizer( wxVERTICAL );
|
bFilteringSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextDisplay = new wxStaticText( this, wxID_ANY, _("Hide nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextDisplay = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Hide nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextDisplay->Wrap( -1 );
|
m_staticTextDisplay->Wrap( -1 );
|
||||||
bFilteringSizer->Add( m_staticTextDisplay, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
bFilteringSizer->Add( m_staticTextDisplay, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_DoNotShowNetNameFilter = new wxTextCtrl( sbSizer3->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
|
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
|
||||||
m_DoNotShowNetNameFilter->SetMinSize( wxSize( 180,-1 ) );
|
m_DoNotShowNetNameFilter->SetMinSize( wxSize( 180,-1 ) );
|
||||||
|
|
||||||
bFilteringSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bFilteringSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_staticTextVFilter = new wxStaticText( this, wxID_ANY, _("Show nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextVFilter = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Show nets matching:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextVFilter->Wrap( -1 );
|
m_staticTextVFilter->Wrap( -1 );
|
||||||
bFilteringSizer->Add( m_staticTextVFilter, 0, wxRIGHT|wxLEFT, 5 );
|
bFilteringSizer->Add( m_staticTextVFilter, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_ShowNetNameFilter = new wxTextCtrl( sbSizer3->GetStaticBox(), ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
|
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
|
||||||
|
|
||||||
bFilteringSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bFilteringSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonRunFilter = new wxButton( sbSizer3->GetStaticBox(), wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bFilteringSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
bFilteringSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_showAllNetsOpt = new wxCheckBox( this, wxID_ANY, _("Show all nets"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_showAllNetsOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show all nets"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bFilteringSizer->Add( m_showAllNetsOpt, 0, wxALL, 5 );
|
bFilteringSizer->Add( m_showAllNetsOpt, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
|
bFilteringSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
m_sortByPadsOpt = new wxCheckBox( this, wxID_ANY, _("Sort nets by pad count"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_sortByPadsOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Sort nets by pad count"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bFilteringSizer->Add( m_sortByPadsOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bFilteringSizer->Add( m_sortByPadsOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_bNoNetWarning = new wxBoxSizer( wxHORIZONTAL );
|
m_bNoNetWarning = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_bitmapNoNetWarning = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
m_bitmapNoNetWarning = new wxStaticBitmap( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_bNoNetWarning->Add( m_bitmapNoNetWarning, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
|
m_bNoNetWarning->Add( m_bitmapNoNetWarning, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
|
||||||
|
|
||||||
m_staticText18 = new wxStaticText( this, wxID_ANY, _("No net will result\nin an unconnected \ncopper island."), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText18 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("No net will result\nin an unconnected \ncopper island."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText18->Wrap( -1 );
|
m_staticText18->Wrap( -1 );
|
||||||
m_bNoNetWarning->Add( m_staticText18, 0, wxALL, 5 );
|
m_bNoNetWarning->Add( m_staticText18, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
@ -107,10 +98,13 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
||||||
bFilteringSizer->Add( m_bNoNetWarning, 1, wxEXPAND|wxTOP, 20 );
|
bFilteringSizer->Add( m_bNoNetWarning, 1, wxEXPAND|wxTOP, 20 );
|
||||||
|
|
||||||
|
|
||||||
m_OptionsBoxSizer->Add( bFilteringSizer, 0, wxEXPAND|wxTOP, 20 );
|
sbSizer3->Add( bFilteringSizer, 0, wxEXPAND, 20 );
|
||||||
|
|
||||||
|
|
||||||
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
m_OptionsBoxSizer->Add( sbSizer3, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* m_ExportableSetupSizer;
|
wxStaticBoxSizer* m_ExportableSetupSizer;
|
||||||
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
|
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
|
||||||
|
@ -166,7 +160,10 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
||||||
|
|
||||||
gbSizer1->AddGrowableCol( 1 );
|
gbSizer1->AddGrowableCol( 1 );
|
||||||
|
|
||||||
m_ExportableSetupSizer->Add( gbSizer1, 1, wxEXPAND|wxRIGHT, 20 );
|
m_ExportableSetupSizer->Add( gbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
m_ExportableSetupSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxGridBagSizer* gbSizer2;
|
wxGridBagSizer* gbSizer2;
|
||||||
gbSizer2 = new wxGridBagSizer( 0, 0 );
|
gbSizer2 = new wxGridBagSizer( 0, 0 );
|
||||||
|
@ -238,7 +235,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
||||||
|
|
||||||
gbSizer2->AddGrowableCol( 1 );
|
gbSizer2->AddGrowableCol( 1 );
|
||||||
|
|
||||||
m_ExportableSetupSizer->Add( gbSizer2, 1, wxEXPAND|wxLEFT, 5 );
|
m_ExportableSetupSizer->Add( gbSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
m_MainBoxSizer->Add( m_ExportableSetupSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,15 +12,16 @@
|
||||||
#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/string.h>
|
#include <wx/dataview.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.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/dataview.h>
|
#include <wx/string.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
#include <wx/listbox.h>
|
#include <wx/listbox.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
|
@ -31,7 +32,6 @@
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/gbsizer.h>
|
#include <wx/gbsizer.h>
|
||||||
#include <wx/statbox.h>
|
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -72,9 +72,7 @@ class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
|
||||||
};
|
};
|
||||||
|
|
||||||
wxBoxSizer* m_MainBoxSizer;
|
wxBoxSizer* m_MainBoxSizer;
|
||||||
wxStaticText* m_staticTextLayers;
|
|
||||||
wxDataViewListCtrl* m_layers;
|
wxDataViewListCtrl* m_layers;
|
||||||
wxStaticText* m_staticTextNets;
|
|
||||||
wxListBox* m_ListNetNameSelection;
|
wxListBox* m_ListNetNameSelection;
|
||||||
wxStaticText* m_staticTextDisplay;
|
wxStaticText* m_staticTextDisplay;
|
||||||
wxTextCtrl* m_DoNotShowNetNameFilter;
|
wxTextCtrl* m_DoNotShowNetNameFilter;
|
||||||
|
|
|
@ -154,7 +154,7 @@ void ZONE_SETTINGS::SetCornerRadius( int aRadius )
|
||||||
#ifdef __WXOSX_MAC__
|
#ifdef __WXOSX_MAC__
|
||||||
const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
|
const static wxSize LAYER_BITMAP_SIZE( 28, 28 ); // wxCocoa impl unhappy if this isn't square...
|
||||||
#else
|
#else
|
||||||
const static wxSize LAYER_BITMAP_SIZE( 24, 18 );
|
const static wxSize LAYER_BITMAP_SIZE( 24, 16 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// A helper for setting up a dialog list for specifying zone layers. Used by all three
|
// A helper for setting up a dialog list for specifying zone layers. Used by all three
|
||||||
|
@ -197,19 +197,16 @@ void ZONE_SETTINGS::SetupLayersList( wxDataViewListCtrl* aList, PCB_BASE_FRAME*
|
||||||
aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
|
aList->SetToggleValue( true, (unsigned) aList->GetItemCount() - 1, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkColWidth = 22;
|
int checkColSize = 22;
|
||||||
int layerColWidth = textWidth + LAYER_BITMAP_SIZE.x + 12;
|
int layerColSize = textWidth + LAYER_BITMAP_SIZE.x + 15;
|
||||||
|
|
||||||
// You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
|
// You'd think the fact that m_layers is a list would encourage wxWidgets not to save room
|
||||||
// for the tree expanders... but you'd be wrong. Force indent to 0.
|
// for the tree expanders... but you'd be wrong. Force indent to 0.
|
||||||
aList->SetIndent( 0 );
|
aList->SetIndent( 0 );
|
||||||
aList->SetMinClientSize( wxSize( checkColWidth + layerColWidth, aList->GetMinClientSize().y ) );
|
aList->SetMinClientSize( wxSize( checkColSize + layerColSize, aList->GetMinClientSize().y ) );
|
||||||
|
|
||||||
checkColumn->SetWidth( checkColWidth );
|
checkColumn->SetWidth( checkColSize );
|
||||||
layerColumn->SetWidth( layerColWidth );
|
layerColumn->SetWidth( layerColSize );
|
||||||
|
|
||||||
int afterCheckColWidth = checkColumn->GetWidth();
|
|
||||||
int afterLayerColWidth = layerColumn->GetWidth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue