summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2013-12-24 21:01:22 +0100
committerSteve Markgraf <steve@steve-m.de>2013-12-24 21:02:32 +0100
commit78201046667987b25ade0b4023805a93353133fe (patch)
treed096a08bc13aa8b20aeba6238e40b6e3ba005c45
parent664d43351cb7e0daee79d20c9771934a99983252 (diff)
ValueDial: fix wheelEvent handling
Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r--sdrbase/gui/valuedial.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/sdrbase/gui/valuedial.cpp b/sdrbase/gui/valuedial.cpp
index 6b0f573..79268fc 100644
--- a/sdrbase/gui/valuedial.cpp
+++ b/sdrbase/gui/valuedial.cpp
@@ -238,10 +238,14 @@ void ValueDial::mouseMoveEvent(QMouseEvent* event)
void ValueDial::wheelEvent(QWheelEvent* event)
{
- if(m_hightlightedDigit < 0)
- return;
- if(m_text[m_hightlightedDigit] == QChar('.'))
+ int i;
+
+ i = (event->x() - 1) / m_digitWidth;
+ if(m_text[i] != QChar('.'))
+ m_hightlightedDigit = i;
+ else
return;
+
if(m_cursor >= 0) {
m_cursor = -1;
m_blinkTimer.stop();