diff --git a/app_state.py b/app_state.py index 2df469d..a93debc 100644 --- a/app_state.py +++ b/app_state.py @@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it. import configparser import os -VERSION = "0.0.0.079" +VERSION = "0.0.0.080" PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") DEFAULT_GRID_SIZE = 10 DEFAULT_ADD_TIMESTAMP = True diff --git a/device_session.py b/device_session.py index 73941e8..618d84f 100644 --- a/device_session.py +++ b/device_session.py @@ -35,6 +35,9 @@ class DeviceSession: self._load_slot_registry(parts) root_comp = self.sox_client.load(0) + # Pre-load immediate children so the tree shows the first level + if root_comp and root_comp.children: + self.load_children(root_comp.id) return root_comp def disconnect(self): @@ -228,6 +231,10 @@ class DeviceSession: child_comp = self.sox_client.cache_get(child_id) if child_comp is not None: self._build_comp_element(comp_elem, child_comp) + else: + # Placeholder so the tree shows a + expand arrow for uncached children + ET.SubElement(comp_elem, "comp", + name="...", id=str(child_id), type="") return comp_elem