mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2026-04-18 05:23:31 +00:00
remove scale enter/leave binds, use hasattr, fix bug in on_mousewheel
remove redundant scale_enter, scale_leave functions. use hasattr over in dir() fix bug in on_mousewheel patch bump
This commit is contained in:
@@ -39,11 +39,11 @@ class ChannelLabelFrame(ttk.LabelFrame):
|
||||
return self.parent.target
|
||||
|
||||
def getter(self, param):
|
||||
if param in dir(self.target):
|
||||
if hasattr(self.target, param):
|
||||
return getattr(self.target, param)
|
||||
|
||||
def setter(self, param, value):
|
||||
if param in dir(self.target):
|
||||
if hasattr(self.target, param):
|
||||
setattr(self.target, param, value)
|
||||
|
||||
def scale_callback(self, *args):
|
||||
@@ -64,12 +64,6 @@ class ChannelLabelFrame(ttk.LabelFrame):
|
||||
self.setter("gain", 0)
|
||||
self.gain.set(0)
|
||||
|
||||
def scale_enter(self, *args):
|
||||
pass
|
||||
|
||||
def scale_leave(self, *args):
|
||||
pass
|
||||
|
||||
def scale_press(self, *args):
|
||||
_base_values.in_scale_button_1 = True
|
||||
|
||||
@@ -90,7 +84,6 @@ class ChannelLabelFrame(ttk.LabelFrame):
|
||||
elif self.gain.get() < -60:
|
||||
self.gain.set(-60)
|
||||
self.setter("gain", self.gain.get())
|
||||
self.parent.parent.nav_frame.info_text.set(round(self.gain.get(), 1))
|
||||
|
||||
def open_config(self):
|
||||
if self.conf.get():
|
||||
|
||||
Reference in New Issue
Block a user