From eb9a60d5780d431a6fb579de8021d9e05c0453ee Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 4 Jun 2013 08:02:06 -0600 Subject: Change auto-increment timing in NxWidgets::CNumericEdit. From Petteri Aimonen --- NxWidgets/libnxwidgets/src/cnumericedit.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'NxWidgets/libnxwidgets/src') diff --git a/NxWidgets/libnxwidgets/src/cnumericedit.cxx b/NxWidgets/libnxwidgets/src/cnumericedit.cxx index 993e86fb8..4a1f6a0e2 100644 --- a/NxWidgets/libnxwidgets/src/cnumericedit.cxx +++ b/NxWidgets/libnxwidgets/src/cnumericedit.cxx @@ -216,15 +216,23 @@ void CNumericEdit::handleActionEvent(const CWidgetEventArgs &e) { m_timercount++; - int increment = m_increment; + // Increment the value at increasing speed. + // Ignore the first 3 timer ticks so that single clicks + // only increment by one. + + int increment = 0; if (m_timercount > 50) { increment = m_increment * 100; } - else if (m_timercount > 10) + else if (m_timercount > 20) { increment = m_increment * 10; } + else if (m_timercount > 3) + { + increment = m_increment; + } if (m_button_minus->isClicked()) { -- cgit v1.2.3