Skip to content

Commit 307ded9

Browse files
committed
another try at validating set values - this works
1 parent e4994a3 commit 307ded9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

GSASII/GSASIIctrlGUI.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +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) # test/show validity
432+
wx.CallAfter(self._TestValidity) # test/show validity
433433
else:
434434
if self.CIFinput:
435435
wx.TextCtrl.__init__(
@@ -568,9 +568,12 @@ def _onStringKey(self,event):
568568

569569
def _TestValidity(self):
570570
'Check validity and change colors accordingly'
571-
if self.Validator:
572-
self.Validator.TestValid(self)
573-
self._IndicateValidity()
571+
try:
572+
if self.Validator:
573+
self.Validator.TestValid(self)
574+
self._IndicateValidity()
575+
except RuntimeError:
576+
pass
574577

575578
def _IndicateValidity(self):
576579
'Set the control colors to show invalid input'

0 commit comments

Comments
 (0)