feat(gui): Migrate _render_history_window to imgui_window scope
This commit is contained in:
+1
-3
@@ -789,7 +789,7 @@ class App:
|
||||
if not self.show_windows.get('Undo/Redo History', False):
|
||||
return
|
||||
|
||||
exp, opened = imgui.begin("Undo/Redo History", self.show_windows['Undo/Redo History'])
|
||||
with imgui_window("Undo/Redo History", self.show_windows['Undo/Redo History']) as (exp, opened):
|
||||
self.show_windows['Undo/Redo History'] = bool(opened)
|
||||
if exp:
|
||||
if imgui.button("Undo") and self.history.can_undo:
|
||||
@@ -805,7 +805,6 @@ class App:
|
||||
imgui.text("No history available.")
|
||||
else:
|
||||
for i, entry in enumerate(reversed(history)):
|
||||
# Actual index in undo stack
|
||||
actual_idx = len(history) - 1 - i
|
||||
desc = entry.get("description", "UI Change")
|
||||
ts = entry.get("timestamp", 0.0)
|
||||
@@ -817,7 +816,6 @@ class App:
|
||||
if selected:
|
||||
self._handle_jump_to_history(actual_idx)
|
||||
imgui.end_child()
|
||||
imgui.end()
|
||||
|
||||
def _gui_func(self) -> None:
|
||||
self._render_custom_title_bar()
|
||||
|
||||
Reference in New Issue
Block a user