Don't send wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED when nothing changed.

The generic double spin control sent UPDATED events whenever it lost focus,
whether anything changed or not.

Don't send events unless the controls value has really changed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-06 12:58:32 +00:00
parent 5afb019a0c
commit 3a71210569
2 changed files with 22 additions and 19 deletions

View File

@@ -105,8 +105,13 @@ protected:
void DoSetRange(double min_val, double max_val);
void DoSetIncrement(double inc);
// Ensure that the textctrl shows correct value
void SyncSpinToText();
// update our value to reflect the text control contents (if it has been
// modified by user, do nothing otherwise)
//
// can also change the text control if its value is invalid
//
// return true if our value has changed
bool SyncSpinToText();
// Send the correct event type
virtual void DoSendEvent() = 0;