Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion construct_editor/wx_widgets/wx_construct_hex_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down