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:
onyx-and-iris
2022-05-14 17:24:33 +01:00
parent a7f23ef544
commit 823c138a5f
5 changed files with 9 additions and 25 deletions

View File

@@ -29,11 +29,11 @@ class Config(ttk.Frame):
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_press(self, *args):