From d12f988c7db65cd5f9205c90c7d1113ca1068c21 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:31:08 +0100 Subject: [PATCH] isdirty now aliases is_updated in strip/bus level classes --- vban_cmd/bus.py | 10 ++++++++-- vban_cmd/strip.py | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/vban_cmd/bus.py b/vban_cmd/bus.py index 917db2c..3a9f54d 100644 --- a/vban_cmd/bus.py +++ b/vban_cmd/bus.py @@ -3,7 +3,6 @@ from abc import abstractmethod from enum import IntEnum from typing import Union -from .error import VMCMDErrors from .iremote import IRemote from .meta import bus_mode_prop, channel_bool_prop, channel_label_prop @@ -94,9 +93,16 @@ class BusLevel(IRemote): return self.getter() @property - def is_updated(self) -> bool: + def isdirty(self) -> bool: + """ + Returns dirty status for this specific channel. + + Expected to be used in a callback only. + """ return any(self._remote._bus_comp[self.range[0] : self.range[-1]]) + is_updated = isdirty + def _make_bus_mode_mixin(): """Creates a mixin of Bus Modes.""" diff --git a/vban_cmd/strip.py b/vban_cmd/strip.py index f84c009..dbf52d8 100644 --- a/vban_cmd/strip.py +++ b/vban_cmd/strip.py @@ -125,9 +125,16 @@ class StripLevel(IRemote): return @property - def is_updated(self) -> bool: + def isdirty(self) -> bool: + """ + Returns dirty status for this specific channel. + + Expected to be used in a callback only. + """ return any(self._remote._strip_comp[self.range[0] : self.range[-1]]) + is_updated = isdirty + class GainLayer(IRemote): def __init__(self, remote, index, i):