This commit is contained in:
2025-12-05 08:08:44 +08:00
parent e0d4d0c364
commit 1f10abfb32
2909 changed files with 2470486 additions and 3024 deletions

View File

@@ -0,0 +1,23 @@
import functools
from ngSkinTools2.api.python_compatibility import Object
class UiLock(Object):
def __init__(self):
self.updating = False
def __enter__(self):
self.updating = True
def skip_if_updating(self, fn):
@functools.wraps(fn)
def wrapper(*args, **kwargs):
if self.updating:
return
return fn(*args, **kwargs)
return wrapper
def __exit__(self, _type, value, traceback):
self.updating = False