mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2026-04-18 05:23:31 +00:00
wrap button callbacks with {cls}.pause_updates()
This commit is contained in:
@@ -68,6 +68,14 @@ class Config(ttk.Frame):
|
||||
self.parent.target.event.add("ldirty")
|
||||
self.after(350, self.resume_updates)
|
||||
|
||||
def pause_updates(self, func, *args):
|
||||
"""function wrapper, adds a 50ms delay on updates"""
|
||||
_base_values.run_update = False
|
||||
|
||||
func(*args)
|
||||
|
||||
self.after(50, self.resume_updates)
|
||||
|
||||
def resume_updates(self):
|
||||
_base_values.run_update = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user