From e225fe17a8dc6a209d224cc966463644c6cc466f Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Wed, 18 Oct 2006 00:06:55 +0000 Subject: [PATCH] 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 --- src/mac/carbon/spinbutt.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mac/carbon/spinbutt.cpp b/src/mac/carbon/spinbutt.cpp index 560ab64352..55de645d54 100644 --- a/src/mac/carbon/spinbutt.cpp +++ b/src/mac/carbon/spinbutt.cpp @@ -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 ); -- 2.45.2