From a7d7ab32c63855088cd33fb9a888e387ddf4e331 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 13 Sep 2018 19:01:44 +0100 Subject: [PATCH] Fix 5.0 regression on typing units into some dialog fields. Fixes: lp:1792066 * https://bugs.launchpad.net/kicad/+bug/1792066 --- pcbnew/dialogs/dialog_design_rules.cpp | 20 ------------------ pcbnew/dialogs/dialog_design_rules_base.cpp | 2 +- pcbnew/dialogs/dialog_design_rules_base.fbp | 23 ++++++++++----------- pcbnew/dialogs/dialog_design_rules_base.h | 3 +-- 4 files changed, 13 insertions(+), 35 deletions(-) diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index e42090784d..fc4821d875 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -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 diff --git a/pcbnew/dialogs/dialog_design_rules_base.cpp b/pcbnew/dialogs/dialog_design_rules_base.cpp index 542781e538..508131fcb6 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.cpp +++ b/pcbnew/dialogs/dialog_design_rules_base.cpp @@ -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! diff --git a/pcbnew/dialogs/dialog_design_rules_base.fbp b/pcbnew/dialogs/dialog_design_rules_base.fbp index 9433d0c7d1..3117ec80a6 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.fbp +++ b/pcbnew/dialogs/dialog_design_rules_base.fbp @@ -14,7 +14,6 @@ dialog_design_rules_base 1000 none - 1 dialog_design_rules_base @@ -1784,7 +1783,7 @@ 5 wxEXPAND 1 - + 3 wxBOTH 1 @@ -1934,8 +1933,8 @@ 0 wxString - wxFILTER_NUMERIC - wxTextValidator + wxFILTER_NONE + wxDefaultValidator @@ -2191,8 +2190,8 @@ 0 wxString - wxFILTER_NUMERIC - wxTextValidator + wxFILTER_NONE + wxDefaultValidator @@ -2448,8 +2447,8 @@ 0 - wxFILTER_NUMERIC - wxTextValidator + wxFILTER_NONE + wxDefaultValidator @@ -2921,8 +2920,8 @@ 0 - wxFILTER_NUMERIC - wxTextValidator + wxFILTER_NONE + wxDefaultValidator @@ -3178,8 +3177,8 @@ 0 - wxFILTER_NUMERIC - wxTextValidator + wxFILTER_NONE + wxDefaultValidator diff --git a/pcbnew/dialogs/dialog_design_rules_base.h b/pcbnew/dialogs/dialog_design_rules_base.h index cd930721d8..c785d42e42 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.h +++ b/pcbnew/dialogs/dialog_design_rules_base.h @@ -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 #include #include -#include #include #include #include