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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user