eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible.

This commit is contained in:
jean-pierre charras 2017-03-14 20:40:21 +01:00
parent 69b350c9b0
commit ccfad8306b
1 changed files with 4 additions and 3 deletions

View File

@ -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<double> textSizeValidator( NULL, wxNUM_VAL_NO_TRAILING_ZEROES );
textSizeValidator.SetPrecision( 4 );