Merge pull request #10 from DocHoncho/int-entry-fix

Tweaked IntEntry behavior - Fix problem selecting the whole text each time a key is pressed and the mouse is over the IntEntry widget
This commit is contained in:
David Capello 2013-12-01 17:08:02 -08:00
commit 2eb84124d0

View File

@ -64,7 +64,11 @@ bool IntEntry::onProcessMessage(Message* msg)
// text is automatically selected.
case kMouseEnterMessage:
requestFocus();
selectText(0, -1);
break;
// Reset value if it's out of bounds when focus is lost
case kFocusLeaveMessage:
setValue(MID(m_min, getValue(), m_max));
break;
case kMouseDownMessage: