isdirty now aliases is_updated in strip/bus level classes

This commit is contained in:
onyx-and-iris 2022-08-02 09:31:08 +01:00
parent 6971feb398
commit d12f988c7d
2 changed files with 16 additions and 3 deletions

View File

@ -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."""

View File

@ -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):