Skip to content

Commit

Permalink
Fix range slider
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed May 6, 2024
1 parent b728d60 commit faf3a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions traitsui/qt/extra/range_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def paintEvent(self, event):
else:
opt.activeSubControls = self.hover_control

opt.sliderPosition = value
opt.sliderValue = value
opt.sliderPosition = int(value)
opt.sliderValue = int(value)
style.drawComplexControl(
QtGui.QStyle.ComplexControl.CC_Slider, opt, painter, self
)
Expand All @@ -103,7 +103,7 @@ def mousePressEvent(self, event):
self.active_slider = -1

for i, value in enumerate([self._low, self._high]):
opt.sliderPosition = value
opt.sliderPosition = int(value)
hit = style.hitTestComplexControl(
style.CC_Slider, opt, event.pos(), self
)
Expand Down

0 comments on commit faf3a5b

Please sign in to comment.