Added multiple selection feature to wxPropertyGrid (enabled by setting wxPG_EX_MULTIPLE_SELECTION style)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-08-17 18:36:00 +00:00
parent 17a5460272
commit fc72fab6c6
15 changed files with 663 additions and 197 deletions

View File

@@ -423,8 +423,9 @@ wxPropertyGridManager::~wxPropertyGridManager()
{
END_MOUSE_CAPTURE
m_pPropGrid->DoSelectProperty(NULL);
m_pPropGrid->m_pState = NULL;
//m_pPropGrid->ClearSelection();
delete m_pPropGrid;
m_pPropGrid = NULL;
size_t i;
for ( i=0; i<m_arrPages.size(); i++ )
@@ -553,7 +554,7 @@ bool wxPropertyGridManager::DoSelectPage( int index )
if ( m_selPage == index )
return true;
if ( m_pPropGrid->m_selected )
if ( m_pPropGrid->GetSelection() )
{
if ( !m_pPropGrid->ClearSelection() )
return false;
@@ -883,6 +884,19 @@ bool wxPropertyGridManager::IsPageModified( size_t index ) const
// -----------------------------------------------------------------------
bool wxPropertyGridManager::IsPropertySelected( wxPGPropArg id ) const
{
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
for ( unsigned int i=0; i<GetPageCount(); i++ )
{
if ( GetPageState(i)->DoIsPropertySelected(p) )
return true;
}
return false;
}
// -----------------------------------------------------------------------
wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const
{
wxASSERT( index >= 0 );