Board setup: replace checkboxes with radio buttons
Fixes https://gitlab.com/kicad/code/kicad/issues/4520
This commit is contained in:
parent
1a946a7094
commit
ab07c852d0
|
@ -59,8 +59,8 @@ bool PANEL_SETUP_FEATURE_CONSTRAINTS::TransferDataToWindow()
|
|||
|
||||
m_maxError.SetValue( m_BrdSettings->m_MaxError );
|
||||
|
||||
m_cbOutlinePolygonFastest->SetValue( m_BrdSettings->m_ZoneUseNoOutlineInFill );
|
||||
m_cbOutlinePolygonBestQ->SetValue( !m_BrdSettings->m_ZoneUseNoOutlineInFill );
|
||||
m_rbOutlinePolygonFastest->SetValue( m_BrdSettings->m_ZoneUseNoOutlineInFill );
|
||||
m_rbOutlinePolygonBestQ->SetValue( !m_BrdSettings->m_ZoneUseNoOutlineInFill );
|
||||
|
||||
m_minClearance.SetValue( m_BrdSettings->m_MinClearance );
|
||||
m_trackMinWidth.SetValue( m_BrdSettings->m_TrackMinWidth );
|
||||
|
@ -107,7 +107,7 @@ bool PANEL_SETUP_FEATURE_CONSTRAINTS::TransferDataFromWindow()
|
|||
m_BrdSettings->m_MaxError = Clamp<int>( IU_PER_MM * MINIMUM_ERROR_SIZE_MM,
|
||||
m_maxError.GetValue(), IU_PER_MM * MAXIMUM_ERROR_SIZE_MM );
|
||||
|
||||
m_BrdSettings->m_ZoneUseNoOutlineInFill = m_cbOutlinePolygonFastest->GetValue();
|
||||
m_BrdSettings->m_ZoneUseNoOutlineInFill = m_rbOutlinePolygonFastest->GetValue();
|
||||
|
||||
m_BrdSettings->m_MinClearance = m_minClearance.GetValue();
|
||||
m_BrdSettings->m_TrackMinWidth = m_trackMinWidth.GetValue();
|
||||
|
@ -169,8 +169,8 @@ void PANEL_SETUP_FEATURE_CONSTRAINTS::onChangeOutlineOpt( wxCommandEvent& event
|
|||
{
|
||||
wxObject* item =event.GetEventObject();
|
||||
|
||||
if( item == m_cbOutlinePolygonBestQ )
|
||||
m_cbOutlinePolygonFastest->SetValue( not m_cbOutlinePolygonBestQ->GetValue() );
|
||||
if( item == m_rbOutlinePolygonBestQ )
|
||||
m_rbOutlinePolygonFastest->SetValue( not m_rbOutlinePolygonBestQ->GetValue() );
|
||||
else
|
||||
m_cbOutlinePolygonBestQ->SetValue( not m_cbOutlinePolygonFastest->GetValue() );
|
||||
m_rbOutlinePolygonBestQ->SetValue( not m_rbOutlinePolygonFastest->GetValue() );
|
||||
}
|
||||
|
|
|
@ -104,12 +104,12 @@ PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::PANEL_SETUP_FEATURE_CONSTRAINTS_BASE( wxWi
|
|||
wxBoxSizer* bSizerOutlinesOpts;
|
||||
bSizerOutlinesOpts = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_cbOutlinePolygonBestQ = new wxCheckBox( this, wxID_ANY, _("Stroked outlines (legacy)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerOutlinesOpts->Add( m_cbOutlinePolygonBestQ, 0, wxALL, 4 );
|
||||
m_rbOutlinePolygonBestQ = new wxRadioButton( this, wxID_ANY, _("Stroked outlines (legacy)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerOutlinesOpts->Add( m_rbOutlinePolygonBestQ, 0, wxALL, 4 );
|
||||
|
||||
m_cbOutlinePolygonFastest = new wxCheckBox( this, wxID_ANY, _("Smoothed polygons (best performance)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbOutlinePolygonFastest->SetValue(true);
|
||||
bSizerOutlinesOpts->Add( m_cbOutlinePolygonFastest, 0, wxALL, 4 );
|
||||
m_rbOutlinePolygonFastest = new wxRadioButton( this, wxID_ANY, _("Smoothed polygons (best performance)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbOutlinePolygonFastest->SetValue( true );
|
||||
bSizerOutlinesOpts->Add( m_rbOutlinePolygonFastest, 0, wxALL, 4 );
|
||||
|
||||
|
||||
bSizer5->Add( bSizerOutlinesOpts, 1, wxEXPAND, 5 );
|
||||
|
@ -337,14 +337,14 @@ PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::PANEL_SETUP_FEATURE_CONSTRAINTS_BASE( wxWi
|
|||
bMainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_cbOutlinePolygonBestQ->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_cbOutlinePolygonFastest->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_rbOutlinePolygonBestQ->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_rbOutlinePolygonFastest->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::~PANEL_SETUP_FEATURE_CONSTRAINTS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_cbOutlinePolygonBestQ->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_cbOutlinePolygonFastest->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_rbOutlinePolygonBestQ->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
m_rbOutlinePolygonFastest->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_SETUP_FEATURE_CONSTRAINTS_BASE::onChangeOutlineOpt ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
|
@ -948,7 +948,7 @@
|
|||
<property name="border">4</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxRadioButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -962,7 +962,6 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -985,7 +984,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbOutlinePolygonBestQ</property>
|
||||
<property name="name">m_rbOutlinePolygonBestQ</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1003,17 +1002,18 @@
|
|||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">onChangeOutlineOpt</event>
|
||||
<event name="OnRadioButton">onChangeOutlineOpt</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<object class="wxRadioButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1027,7 +1027,6 @@
|
|||
<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>
|
||||
|
@ -1050,7 +1049,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbOutlinePolygonFastest</property>
|
||||
<property name="name">m_rbOutlinePolygonFastest</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1068,10 +1067,11 @@
|
|||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value">1</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnCheckBox">onChangeOutlineOpt</event>
|
||||
<event name="OnRadioButton">onChangeOutlineOpt</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <wx/statline.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -51,8 +52,8 @@ class PANEL_SETUP_FEATURE_CONSTRAINTS_BASE : public wxPanel
|
|||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* m_stZoneFilledPolysOpt;
|
||||
wxStaticBitmap* m_bitmapZoneFillOpt;
|
||||
wxCheckBox* m_cbOutlinePolygonBestQ;
|
||||
wxCheckBox* m_cbOutlinePolygonFastest;
|
||||
wxRadioButton* m_rbOutlinePolygonBestQ;
|
||||
wxRadioButton* m_rbOutlinePolygonFastest;
|
||||
wxStaticText* m_staticText23;
|
||||
wxStaticBitmap* m_bitmapClearance;
|
||||
wxStaticText* m_clearanceTitle;
|
||||
|
|
Loading…
Reference in New Issue