]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed bug: wxPGProperty::OnEvent() was never called if primary editor window was...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 25 Sep 2008 15:59:49 +0000 (15:59 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 25 Sep 2008 15:59:49 +0000 (15:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp

index 41b0144131f7bf945920d2491817e7ceb7a254ef..9ecf73f6b110c6ead6f85560a1222d94caf0cbca 100644 (file)
@@ -3279,22 +3279,25 @@ void wxPropertyGrid::OnCustomEditorEvent( wxCommandEvent &event )
         }
     }
 
-    if ( wnd && !buttonWasHandled )
+    if ( !buttonWasHandled )
     {
-        // First call editor class' event handler.
-        const wxPGEditor* editor = selected->GetEditorClass();
-
-        if ( editor->OnEvent( this, selected, wnd, event ) )
+        if ( wnd )
         {
-            // If changes, validate them
-            if ( DoEditorValidate() )
-            {
-                if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) )
-                    valueIsPending = true;
-            }
-            else
+            // First call editor class' event handler.
+            const wxPGEditor* editor = selected->GetEditorClass();
+
+            if ( editor->OnEvent( this, selected, wnd, event ) )
             {
-                validationFailure = true;
+                // If changes, validate them
+                if ( DoEditorValidate() )
+                {
+                    if ( editor->GetValueFromControl( pendingValue, m_selected, wnd ) )
+                        valueIsPending = true;
+                }
+                else
+                {
+                    validationFailure = true;
+                }
             }
         }