Do not send a changed event if a button is clicked for down/up when the control is already at min/max and wrap is not specified. Fixes both wxSpinButton and wxSpinCtrl. Bug #1578523.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -124,6 +124,11 @@ void wxSpinButton::MacHandleValueChanged( int inc )
|
|||||||
else
|
else
|
||||||
scrollEvent = wxEVT_SCROLL_THUMBTRACK;
|
scrollEvent = wxEVT_SCROLL_THUMBTRACK;
|
||||||
|
|
||||||
|
// Do not send an event if the value has not actually changed
|
||||||
|
// (Also works for wxSpinCtrl)
|
||||||
|
if ( m_value == oldValue )
|
||||||
|
return;
|
||||||
|
|
||||||
wxSpinEvent event( scrollEvent, m_windowId );
|
wxSpinEvent event( scrollEvent, m_windowId );
|
||||||
|
|
||||||
event.SetPosition( m_value );
|
event.SetPosition( m_value );
|
||||||
|
Reference in New Issue
Block a user