From ccfad8306bbafe5df945adce94878aaa1b34573e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 14 Mar 2017 20:40:21 +0100 Subject: [PATCH] eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible. --- eeschema/dialogs/dialog_edit_label.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index dce7b716f0..090d911e08 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -111,9 +111,10 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe m_CurrentText = aTextItem; InitDialog(); - // Conservative limits 0.01 to 10.0 inches - int minSize = 10 * IU_PER_MILS; - int maxSize = 10 * 1000 * IU_PER_MILS; + // Conservative limits 0.0 to 10.0 inches + const int minSize = 0; // a value like 0.01 is better, but if > 0, creates + // annoying issues when trying to enter a value starting by 0 or .0 + const int maxSize = 10 * 1000 * IU_PER_MILS; wxFloatingPointValidator textSizeValidator( NULL, wxNUM_VAL_NO_TRAILING_ZEROES ); textSizeValidator.SetPrecision( 4 );