mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
removes changed_attribute path after on_change method
This commit is contained in:
parent
c0ba23b0b2
commit
dc42bfaa9b
@ -14,11 +14,11 @@ class Observer(ABC):
|
|||||||
self.changing_attributes: list[str] = []
|
self.changing_attributes: list[str] = []
|
||||||
|
|
||||||
def _notify_changed(self, changed_attribute: str, value: Any) -> None:
|
def _notify_changed(self, changed_attribute: str, value: Any) -> None:
|
||||||
|
self.on_change(full_access_path=changed_attribute, value=value)
|
||||||
|
|
||||||
if changed_attribute in self.changing_attributes:
|
if changed_attribute in self.changing_attributes:
|
||||||
self.changing_attributes.remove(changed_attribute)
|
self.changing_attributes.remove(changed_attribute)
|
||||||
|
|
||||||
self.on_change(full_access_path=changed_attribute, value=value)
|
|
||||||
|
|
||||||
def _notify_change_start(self, changing_attribute: str) -> None:
|
def _notify_change_start(self, changing_attribute: str) -> None:
|
||||||
self.changing_attributes.append(changing_attribute)
|
self.changing_attributes.append(changing_attribute)
|
||||||
self.on_change_start(changing_attribute)
|
self.on_change_start(changing_attribute)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user