Private
Public Access
chore(commands): remove dead test-fixture path from reset_layout
This commit is contained in:
+4
-9
@@ -355,21 +355,16 @@ def reset_layout(app: "App") -> None:
|
||||
window names that no longer exist (e.g. after a refactor renames
|
||||
windows) and the dock space appears empty / non-recoverable via
|
||||
the Windows menu. Sets every show_windows entry to True and
|
||||
deletes manualslop_layout.ini so hello_imgui regenerates a fresh
|
||||
dock layout on the next frame (and the next process shutdown saves
|
||||
the new layout in place of the stale one). The user will need to
|
||||
restart sloppy.py for the dock layout to fully take effect; the
|
||||
show_windows toggles take effect immediately.
|
||||
deletes the cwd's manualslop_layout.ini so hello_imgui regenerates
|
||||
a fresh dock layout on the next process restart. The show_windows
|
||||
toggles take effect immediately.
|
||||
"""
|
||||
if hasattr(app, "show_windows") and isinstance(app.show_windows, dict):
|
||||
for name in app.show_windows.keys():
|
||||
app.show_windows[name] = True
|
||||
try:
|
||||
import os
|
||||
layout_paths = [
|
||||
"manualslop_layout.ini",
|
||||
os.path.join("tests", "artifacts", "live_gui_workspace", "manualslop_layout.ini"),
|
||||
]
|
||||
layout_paths: list[str] = ["manualslop_layout.ini"]
|
||||
for p in layout_paths:
|
||||
if os.path.exists(p):
|
||||
os.remove(p)
|
||||
|
||||
Reference in New Issue
Block a user