]> git.saurik.com Git - wxWidgets.git/commitdiff
Do not clear property selection when adding new properties, but instead correct posit...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Tue, 2 Feb 2010 15:19:41 +0000 (15:19 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Tue, 2 Feb 2010 15:19:41 +0000 (15:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp
src/propgrid/propgridiface.cpp
src/propgrid/propgridpagestate.cpp

index d74291cfd3370ecbce1f3f25aae19423d809e81a..296559d4eec46af6196f2b7b174bc8913db887eb 100644 (file)
@@ -1564,6 +1564,9 @@ void wxPropertyGrid::PrepareAfterItemsAdded()
         Sort(wxPG_SORT_TOP_LEVEL_ONLY);
 
     RecalculateVirtualSize();
+
+    // Fix editor position
+    CorrectEditorWidgetPosY();
 }
 
 // -----------------------------------------------------------------------
index cbef5d654ef8430965a7eef38d4d4981991bd91b..9ea84d5b42a9565f7bde13ad9f9e3f0ae9310cad 100644 (file)
@@ -587,8 +587,6 @@ void wxPropertyGridInterface::Sort( int flags )
 {
     wxPropertyGrid* pg = GetPropertyGrid();
 
-    pg->DoClearSelection();
-
     unsigned int pageIndex = 0;
 
     for (;;)
@@ -598,6 +596,10 @@ void wxPropertyGridInterface::Sort( int flags )
         page->DoSort(flags);
         pageIndex++;
     }
+
+    // Fix positions of any open editor controls
+    if ( pg )
+        pg->CorrectEditorWidgetPosY();
 }
 
 // -----------------------------------------------------------------------
index 8c8d00667eb400ea9e4d019ecd6127b83021b639..80da0f9388b375b2ccd6d5c6090d2ee36c737148 100644 (file)
@@ -1671,10 +1671,6 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property,
     }
 #endif // wxDEBUG_LEVEL
 
-    // Make sure nothing is selected.
-    if ( propGrid )
-        propGrid->ClearSelection(false);
-
     // NULL parent == root parent
     if ( !scheduledParent )
         scheduledParent = DoGetRoot();