]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgrid.cpp
fixing setting initial value under osx_cocoa for single line text controls
[wxWidgets.git] / src / propgrid / propgrid.cpp
index e941c2a6c16f406b971baed35d0c703a9f286f38..18370b90df7aa76163f3c6f7fc1db799e731aa8b 100644 (file)
@@ -582,7 +582,7 @@ wxPropertyGrid::~wxPropertyGrid()
 {
     size_t i;
 
-#if wxUSE_THREAD
+#if wxUSE_THREADS
     wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
 #endif
 
@@ -3334,7 +3334,12 @@ void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
 
     // Somehow, event is handled after property has been deselected.
     // Possibly, but very rare.
-    if ( !selected || selected->HasFlag(wxPG_PROP_BEING_DELETED) )
+    if ( !selected ||
+          selected->HasFlag(wxPG_PROP_BEING_DELETED) ||
+          // Also don't handle editor event if wxEVT_PG_CHANGED or
+          // similar is currently doing something (showing a
+          // message box, for instance).
+          m_processedEvent )
         return;
 
     if ( m_iFlags & wxPG_FL_IN_HANDLECUSTOMEDITOREVENT )
@@ -5889,7 +5894,7 @@ void wxPropertyGridEvent::OnPropertyGridSet()
     if ( !m_pg )
         return;
 
-#if wxUSE_THREAD
+#if wxUSE_THREADS
     wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
 #endif
     m_pg->m_liveEvents.push_back(this);
@@ -5901,7 +5906,7 @@ wxPropertyGridEvent::~wxPropertyGridEvent()
 {
     if ( m_pg )
     {
-    #if wxUSE_THREAD
+    #if wxUSE_THREADS
         wxCriticalSectionLocker(wxPGGlobalVars->m_critSect);
     #endif