Do not clear property selection when adding new properties, but instead correct positions of any open editor controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli 2010-02-02 15:19:41 +00:00
parent 8c0f078408
commit 7261371b17
3 changed files with 7 additions and 6 deletions

View File

@ -1564,6 +1564,9 @@ void wxPropertyGrid::PrepareAfterItemsAdded()
Sort(wxPG_SORT_TOP_LEVEL_ONLY);
RecalculateVirtualSize();
// Fix editor position
CorrectEditorWidgetPosY();
}
// -----------------------------------------------------------------------

View 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();
}
// -----------------------------------------------------------------------

View 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();