]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgridpagestate.cpp
Clear grid selection more consistently prior clear operations; improved Clear() tests...
[wxWidgets.git] / src / propgrid / propgridpagestate.cpp
index ed24230a420326a44af619ae57c970f81e885396..a0aeef77886171bd0ae252ae53e47d19de825566 100644 (file)
@@ -268,6 +268,15 @@ void wxPropertyGridPageState::InitNonCatMode()
 
 void wxPropertyGridPageState::DoClear()
 {
+    if ( m_pPropGrid->GetState() == this  )
+    {
+        m_pPropGrid->ClearSelection(false);
+    }
+    else
+    {
+        m_selected = NULL;
+    }
+
     m_regularArray.Empty();
     if ( m_abcArray )
         m_abcArray->Empty();
@@ -280,8 +289,6 @@ void wxPropertyGridPageState::DoClear()
 
     m_virtualHeight = 0;
     m_vhCalcPending = 0;
-
-    m_selected = NULL;
 }
 
 // -----------------------------------------------------------------------