[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 """
- [Commit-gnuradio] [gnuradio] branch master updated (d8ffe56 -> e2815ab), git, 2015/04/08
- [Commit-gnuradio] [gnuradio] 06/06: Merge remote-tracking branch 'sdh11/qt-range', git, 2015/04/08
- [Commit-gnuradio] [gnuradio] 02/06: qtgui: Slight modification to the precision of the counter in the qt range., git, 2015/04/08
- [Commit-gnuradio] [gnuradio] 04/06: qtgui: Fixed issue where clicking on the range widget jumped to the wrong location,
git <=
- [Commit-gnuradio] [gnuradio] 01/06: blocks: fixed problem with setting peak detector's alpha value., git, 2015/04/08
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'tom/blocks/peak_detector2_alpha', git, 2015/04/08
- [Commit-gnuradio] [gnuradio] 03/06: qtgui: Refactored range widget. Enabled slider focus, fixed issue where slider event caused counter to round, and fixed whitespace to match PEP8., git, 2015/04/08