[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/08: qtgui: cherry-pick the range slide s
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/08: qtgui: cherry-pick the range slide starting point bug fix |
Date: |
Sat, 4 Apr 2015 17:39:31 +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 5a0322bfbfa59b1009fb55de8b8085155c7b1471
Author: Bill Clark <address@hidden>
Date: Thu Apr 2 21:00:29 2015 -0400
qtgui: cherry-pick the range slide starting point bug fix
---
gr-qtgui/python/qtgui/range.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gr-qtgui/python/qtgui/range.py b/gr-qtgui/python/qtgui/range.py
index 566170d..2a3aad0 100755
--- a/gr-qtgui/python/qtgui/range.py
+++ b/gr-qtgui/python/qtgui/range.py
@@ -92,7 +92,8 @@ class RangeWidget(QtGui.QWidget):
self.setSingleStep(ranges.step)
self.setNotchesVisible(True)
self.setNotchTarget(ranges.step)
- self.setValue(ranges.default)
+ temp = [abs(x-ranges.default) for x in ranges.ds_vals]
+ self.setValue(temp.index(min(temp)))
self.valueChanged.connect(slot)
class Slider(QtGui.QSlider):
@@ -101,7 +102,8 @@ class RangeWidget(QtGui.QWidget):
QtGui.QSlider.__init__(self, QtCore.Qt.Horizontal, parent)
self.setFocusPolicy(QtCore.Qt.NoFocus)
self.setRange(0, ranges.ds_steps-1)
- self.setValue(ranges.default)
+ temp = [abs(x-ranges.default) for x in ranges.ds_vals]
+ self.setValue(temp.index(min(temp)))
self.setPageStep(1)
self.setSingleStep(1)
self.setTickPosition(2)
- [Commit-gnuradio] [gnuradio] branch master updated (6afc40e -> e16f948), git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 05/08: Merge branch 'maint', git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 06/08: Merge remote-tracking branch 'mfischer/micro_cleanup', git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 01/08: runtime: cleanup: Removing leftovers., git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 02/08: qtgui: cherry-pick the range slide starting point bug fix,
git <=
- [Commit-gnuradio] [gnuradio] 03/08: qtqui: fixed notches on knob, git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'github/blocks_cleanup', git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 07/08: Merge remote-tracking branch 'tkoehn/additional_fix', git, 2015/04/04
- [Commit-gnuradio] [gnuradio] 04/08: blocks: misc. formatting cleanups, git, 2015/04/04