Compare commits

...

2 Commits

Author SHA1 Message Date
67c8c1e93d use KNOWN_TYPES in on change comparison 2026-02-06 19:10:46 +01:00
8bc33c790c do not emit EVT_TEXT in set value 2026-02-06 19:10:02 +01:00
2 changed files with 7 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ class MathEntry(wx.TextCtrl):
def SetValue(self, val):
self.value_type = type(val)
val = str(val)
super().SetValue(val)
super().ChangeValue(val) #TODO
def on_enter(self, event):
@@ -94,7 +94,7 @@ class MathEntry(wx.TextCtrl):
def clear(self):
super().SetValue("")
super().ChangeValue("") #TODO

View File

@@ -301,6 +301,11 @@ class MainPanel(wx.Panel):
def on_change(self, event):
old_cfg = self.orig_cfg
new_cfg = self.make_cfg()
for k, v in KNOWN_TYPES.items():
if new_cfg.get(k) is None:
new_cfg[k] = v
color = wx.Colour(164, 36, 23) if new_cfg != old_cfg else wx.NullColour
self.btn_save.SetBackgroundColour(color)