File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 370
370
the Unit Tests are registered as built-in NSH applications (2013-5-30).
371
371
* NxWidgets::CImage: Allow a NULL pointer for a bitmap. Add protection
372
372
to prevent dereferencing the NULL pointer. From Petteri Aimonen
373
- (2013-6-3).
373
+ (2013-6-4).
374
+ * NxWidgets::CNumericEdit: Delay before auto-incrementing now varies:
375
+ A longer delay is required to start auto-incrementing and speed increases
376
+ while pressed. From Petteri Aimonen (2013-6-4).
374
377
Original file line number Diff line number Diff line change @@ -216,15 +216,23 @@ void CNumericEdit::handleActionEvent(const CWidgetEventArgs &e)
216
216
{
217
217
m_timercount++;
218
218
219
- int increment = m_increment;
219
+ // Increment the value at increasing speed.
220
+ // Ignore the first 3 timer ticks so that single clicks
221
+ // only increment by one.
222
+
223
+ int increment = 0 ;
220
224
if (m_timercount > 50 )
221
225
{
222
226
increment = m_increment * 100 ;
223
227
}
224
- else if (m_timercount > 10 )
228
+ else if (m_timercount > 20 )
225
229
{
226
230
increment = m_increment * 10 ;
227
231
}
232
+ else if (m_timercount > 3 )
233
+ {
234
+ increment = m_increment;
235
+ }
228
236
229
237
if (m_button_minus->isClicked ())
230
238
{
You can’t perform that action at this time.
0 commit comments