mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-05 21:20:40 +02: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:
parent
bd7a46ddc1
commit
c0ba23b0b2
@ -148,6 +148,7 @@ class _ObservableList(ObservableObject, list[Any]):
|
|||||||
self._notify_changed(f"[{key}]", value)
|
self._notify_changed(f"[{key}]", value)
|
||||||
|
|
||||||
def append(self, __object: Any) -> None:
|
def append(self, __object: Any) -> None:
|
||||||
|
self._notify_change_start("")
|
||||||
self._initialise_new_objects(f"[{len(self)}]", __object)
|
self._initialise_new_objects(f"[{len(self)}]", __object)
|
||||||
super().append(__object)
|
super().append(__object)
|
||||||
self._notify_changed("", self)
|
self._notify_changed("", self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user