mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-12-28 00:31:18 +01:00
appending to a list now also triggers _notify_change_start
This helps in understanding if the list entries being added are "changing" themselves. Properties within the added objects will trigger property changes when they are serialized, so we have to tell the observer that he should not listen to them.
This commit is contained in:
@@ -148,6 +148,7 @@ class _ObservableList(ObservableObject, list[Any]):
|
||||
self._notify_changed(f"[{key}]", value)
|
||||
|
||||
def append(self, __object: Any) -> None:
|
||||
self._notify_change_start("")
|
||||
self._initialise_new_objects(f"[{len(self)}]", __object)
|
||||
super().append(__object)
|
||||
self._notify_changed("", self)
|
||||
|
||||
Reference in New Issue
Block a user