]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/spinctrl.cpp
mask fixes for non-core graphics case (this build uses CopyDeepMask for painting...
[wxWidgets.git] / src / mac / carbon / spinctrl.cpp
index 40e5211fbd68109a77bd4a5dcce458e7c7fdf24c..70b684526546176a655a1411e16d8dae08e891fe 100644 (file)
@@ -8,10 +8,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "spinctrl.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #if wxUSE_SPINCTRL
@@ -55,9 +51,19 @@ protected:
         {
             m_spin->GetSpinButton()->SetValue(val);
 
+            // If we're already processing a text update from m_spin,
+            // don't send it again, since we could end up recursing
+            // infinitely.
+            if (event.GetId() == m_spin->GetId())
+            {
+                event.Skip();
+                return;
+            }
+
             // Send event that the text was manually changed
             wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_spin->GetId());
             event.SetEventObject(m_spin);
+            event.SetString(m_spin->GetText()->GetValue());
             event.SetInt(val);
 
             m_spin->GetEventHandler()->ProcessEvent(event);