Skip to content

Commit bb286c8

Browse files
committed
do a _TestValidity on init of ValidatedTextCtrl for floats so bad values are immediately flagged
1 parent ec6e02a commit bb286c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GSASII/GSASIIctrlGUI.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ def __init__(self,parent,loc,key,nDig=None,notBlank=True,xmin=None,xmax=None,
429429
else:
430430
self.invalid = True
431431
self._IndicateValidity()
432+
wx.CallAfter(self._TestValidity) # entry changed, test/show validity
432433
else:
433434
if self.CIFinput:
434435
wx.TextCtrl.__init__(
@@ -468,7 +469,7 @@ def SetValue(self,val,warn=True):
468469
# for debugging flag calls. Set warn to False for calls that are not in callbacks
469470
# and thus are OK
470471
if GSASIIpath.GetConfigValue('debug') and warn:
471-
print('ValidatedTxtCtrl.SetValue() used in callback. Batter as ChangeValue()?')
472+
print('ValidatedTxtCtrl.SetValue() used in callback. Better as ChangeValue()?')
472473
G2obj.HowDidIgetHere(True)
473474
if self.result is not None:
474475
self.result[self.key] = val

0 commit comments

Comments
 (0)