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:
Kevin Hock 2006-10-18 00:06:55 +00:00
parent 61b3549028
commit e225fe17a8

View File

@ -124,6 +124,11 @@ void wxSpinButton::MacHandleValueChanged( int inc )
else
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 );
event.SetPosition( m_value );