Add a Properties view for the app root
The root tree row now names the app component, "app (<host:port>)" or "app (<file>)", and offers Properties from its context menu and on double-click. The live DOM's <app> element now carries its type and slot values, and the refresh-by-id lookup finds it, so the view shows real sys::App values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-3
@@ -64,12 +64,13 @@ def refresh_treeview_from_dom(xml_root):
|
||||
return
|
||||
|
||||
if app_state.live_mode:
|
||||
file_name = f"{app_state.device_host}:{app_state.device_port}"
|
||||
source = f"{app_state.device_host}:{app_state.device_port}"
|
||||
else:
|
||||
file_name = os.path.basename(app_state.current_file_path)
|
||||
source = os.path.basename(app_state.current_file_path)
|
||||
# The row is the <app> component itself; where it came from goes in brackets.
|
||||
# Inserted plain. refresh_dirty_display puts the unsaved tag on or off, and runs
|
||||
# after every rebuild, so a fresh row picks up the right state there.
|
||||
root_node = tree.insert("", "end", text=file_name, open=True)
|
||||
root_node = tree.insert("", "end", text=f"app ({source})", open=True)
|
||||
|
||||
app_element = xml_root.find("app")
|
||||
if app_element is not None:
|
||||
|
||||
Reference in New Issue
Block a user