Fix 5.0 regression on typing units into some dialog fields.
Fixes: lp:1792066 * https://bugs.launchpad.net/kicad/+bug/1792066
This commit is contained in:
parent
61715a8df5
commit
a7d7ab32c6
|
@ -185,8 +185,6 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent ) :
|
|||
column0.SetText( NET_TITLE );
|
||||
column1.SetText( CLASS_TITLE );
|
||||
|
||||
SetDataValidators();
|
||||
|
||||
m_leftListCtrl->InsertColumn( 0, column0 );
|
||||
m_leftListCtrl->InsertColumn( 1, column1 );
|
||||
m_leftListCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE );
|
||||
|
@ -219,24 +217,6 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent ) :
|
|||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
void DIALOG_DESIGN_RULES::SetDataValidators()
|
||||
{
|
||||
// Set floating-point validators for numerical inputs
|
||||
wxFloatingPointValidator< double > fpValidator( NULL, wxNUM_VAL_ZERO_AS_BLANK | wxNUM_VAL_NO_TRAILING_ZEROES );
|
||||
|
||||
int maxDimension = 1000 * IU_PER_MILS; // One-inch
|
||||
|
||||
fpValidator.SetRange( 0, To_User_Unit( g_UserUnit, maxDimension ) );
|
||||
fpValidator.SetPrecision( 10 );
|
||||
|
||||
m_SetViasMinSizeCtrl->SetValidator( fpValidator );
|
||||
m_SetViasMinDrillCtrl->SetValidator( fpValidator );
|
||||
m_SetMicroViasMinSizeCtrl->SetValidator( fpValidator );
|
||||
m_SetMicroViasMinDrillCtrl->SetValidator( fpValidator );
|
||||
m_SetTrackMinWidthCtrl->SetValidator( fpValidator );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_DESIGN_RULES::InitDialogRules()
|
||||
{
|
||||
// @todo: Move the initialization code into TransferDataToWindow() to follow wxWidgets
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_design_rules_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_design_rules_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -1784,7 +1783,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="0">
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
|
@ -1934,8 +1933,8 @@
|
|||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type">wxString</property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@ -2191,8 +2190,8 @@
|
|||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type">wxString</property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@ -2448,8 +2447,8 @@
|
|||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@ -2921,8 +2920,8 @@
|
|||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@ -3178,8 +3177,8 @@
|
|||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -32,7 +32,6 @@ class NETS_LIST_CTRL;
|
|||
#include <wx/icon.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/dialog.h>
|
||||
|
|
Loading…
Reference in New Issue