From c559508175c7a6726b8c4ed5f9443eb257080d04 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Wed, 7 Aug 2019 23:05:55 +0300 Subject: [PATCH] Avoid unnecessary calls --- gui/builtinItemStatsViews/attributeSlider.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gui/builtinItemStatsViews/attributeSlider.py b/gui/builtinItemStatsViews/attributeSlider.py index 3ea5a568b..c81ae661d 100644 --- a/gui/builtinItemStatsViews/attributeSlider.py +++ b/gui/builtinItemStatsViews/attributeSlider.py @@ -131,11 +131,9 @@ class AttributeSlider(wx.Panel): def OnMouseWheel(self, evt): if evt.GetWheelRotation() > 0 and evt.GetWheelAxis() == wx.MOUSE_WHEEL_VERTICAL: - self.ctrl.Value = self.ctrl.Value + self.ctrl.Increment - self.SetValue(self.GetValue()) + self.SetValue(self.ctrl.Value + self.ctrl.Increment) elif evt.GetWheelRotation() < 0 and evt.GetWheelAxis() == wx.MOUSE_WHEEL_VERTICAL: - self.ctrl.Value = self.ctrl.Value - self.ctrl.Increment - self.SetValue(self.GetValue()) + self.SetValue(self.ctrl.Value - self.ctrl.Increment) else: evt.Skip()