diff --git a/geos-trame/src/geos/trame/app/deck/tree.py b/geos-trame/src/geos/trame/app/deck/tree.py index b732ddea..95e6221a 100644 --- a/geos-trame/src/geos/trame/app/deck/tree.py +++ b/geos-trame/src/geos/trame/app/deck/tree.py @@ -77,7 +77,7 @@ def update( self, path: str, key: str, value: Any ) -> None: new_path = [ int( x ) if x.isdigit() else x for x in path.split( "/" ) ] new_path.append( key ) assert self.input_file is not None and self.input_file.pb_dict is not None - funcy.set_in( self.input_file.pb_dict, new_path, value ) + self.input_file.pb_dict = funcy.set_in( self.input_file.pb_dict, new_path, value ) def _search( self, path: str ) -> list | None: new_path = path.split( "/" ) @@ -286,7 +286,7 @@ def _set_base_model_properties( model: dict, proxy_path: str, properties: dict ) if proxy_name.isnumeric() and int( proxy_name ) < len( model_copy ): models.append( ( proxy_name, model_copy ) ) - model_copy = model_copy[ proxy_name ] + model_copy = model_copy[ int( proxy_name ) if is_list else proxy_name ] continue if proxy_name in model_copy: diff --git a/geos-trame/src/geos/trame/app/ui/inspector.py b/geos-trame/src/geos/trame/app/ui/inspector.py index 2fad1245..fc7a70c0 100644 --- a/geos-trame/src/geos/trame/app/ui/inspector.py +++ b/geos-trame/src/geos/trame/app/ui/inspector.py @@ -8,6 +8,8 @@ from trame.widgets import vuetify3 as vuetify, html from trame_simput import get_simput_manager +from xsdata.utils import text + from geos.trame.app.data_types.field_status import FieldStatus from geos.trame.app.data_types.renderable import Renderable from geos.trame.app.data_types.tree_node import TreeNode @@ -61,9 +63,9 @@ def _on_change( topic: str, ids: list | None = None ) -> None: if ids is not None and topic == "changed": for obj_id in ids: proxy = self.simput_manager.proxymanager.get( obj_id ) - self.tree.decode( obj_id ) + #self.tree.decode( obj_id ) # if const function and return not used why ?? to decode context ?? for prop in proxy.edited_property_names: - self.tree.update( obj_id, prop, proxy.get_property( prop ) ) + self.tree.update( obj_id, text.camel_case( prop ), proxy.get_property( prop ) ) self.simput_manager.proxymanager.on( _on_change )