MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / OnText

Method OnText

gui/utils/inputs.py:94–104  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

92 return self._validator.getReason(self.GetValue())
93
94 def OnText(self, event):
95 currentValue = self.GetValue()
96 if currentValue == self._storedValue:
97 event.Skip()
98 return
99 if currentValue == '' or re.match(r'^\d*\.?\d*$', currentValue):
100 self._storedValue = currentValue
101 self.updateColor()
102 event.Skip()
103 else:
104 self.ChangeValue(self._storedValue)
105
106 def GetValueFloat(self):
107 return strToFloat(self.GetValue())

Callers

nothing calls this directly

Calls 3

updateColorMethod · 0.95
ChangeValueMethod · 0.95
GetValueMethod · 0.45

Tested by

no test coverage detected