commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/06: qtgui: Fixed issue where clicking on


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/06: qtgui: Fixed issue where clicking on the range widget jumped to the wrong location
Date: Wed, 8 Apr 2015 23:27:17 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit fe358929a19ae5a4296612f305a40d84e37e99c9
Author: Seth Hitefield <address@hidden>
Date:   Wed Apr 8 18:46:15 2015 -0400

    qtgui: Fixed issue where clicking on the range widget jumped to the wrong 
location
---
 gr-qtgui/python/qtgui/range.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py
index bdc6e59..168e666 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 """



reply via email to

[Prev in Thread] Current Thread [Next in Thread]