summaryrefslogtreecommitdiff
path: root/gr-qtgui/python/qtgui/range.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/python/qtgui/range.py')
-rwxr-xr-xgr-qtgui/python/qtgui/range.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py
index bdc6e59954..168e6662c3 100755
--- a/gr-qtgui/python/qtgui/range.py
+++ b/gr-qtgui/python/qtgui/range.py
@@ -156,7 +156,15 @@ class RangeWidget(QtGui.QWidget):
new = self.minimum() + ((self.maximum()-self.minimum()) * event.x()) / self.width()
self.setValue(new)
event.accept()
- QtGui.QSlider.mousePressEvent(self, event)
+ # Use repaint rather than calling the super mousePressEvent.
+ # Calling super causes issue where slider jumps to wrong value.
+ QtGui.QSlider.repaint(self)
+
+ def mouseMoveEvent(self, event):
+ new = self.minimum() + ((self.maximum()-self.minimum()) * event.x()) / self.width()
+ self.setValue(new)
+ event.accept()
+ QtGui.QSlider.repaint(self)
class Counter(QtGui.QDoubleSpinBox):
""" Creates the range using a counter """