From 763b42aedc15b50073b2214b6e9c04d1e4d32086 Mon Sep 17 00:00:00 2001 From: timrid <6593626+timrid@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:49:28 +0200 Subject: [PATCH] Fixed Regression from #42 --- construct_editor/wx_widgets/wx_construct_hex_editor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/construct_editor/wx_widgets/wx_construct_hex_editor.py b/construct_editor/wx_widgets/wx_construct_hex_editor.py index 61bbf36..2ffd7d6 100644 --- a/construct_editor/wx_widgets/wx_construct_hex_editor.py +++ b/construct_editor/wx_widgets/wx_construct_hex_editor.py @@ -113,7 +113,7 @@ def _init_gui_hex_visibility(self, hsizer: wx.BoxSizer): self, wx.ID_ANY, "«", size=wx.Size(12, -1) ) hsizer.Add(self.toggle_hex_visibility_btn, 0, wx.EXPAND | wx.ALL, 0) - self.toggle_hex_visibility_btn.Bind(wx.EVT_BUTTON, self.toggle_hex_visibility) + self.toggle_hex_visibility_btn.Bind(wx.EVT_BUTTON, self._on_toggle_hex_visibility_btn) def _init_gui_construct_editor(self, hsizer: wx.BoxSizer, construct: cs.Construct[t.Any, t.Any]): self.construct_editor: WxConstructEditor = WxConstructEditor( @@ -133,6 +133,9 @@ def refresh(self): self._convert_binary_to_struct() self.Thaw() + def _on_toggle_hex_visibility_btn(self, event: wx.CommandEvent): + self.toggle_hex_visibility() + def toggle_hex_visibility(self): """Toggle the visibility of the HexEditor""" if self._hex_editor_visible: