Allow wxPropertyGridInterface::ClearSelection() to be called with NULL state (fixes defect #10195)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -361,11 +361,16 @@ bool wxPropertyGridInterface::ClearSelection( bool validation )
|
|||||||
flags |= wxPG_SEL_NOVALIDATE;
|
flags |= wxPG_SEL_NOVALIDATE;
|
||||||
|
|
||||||
wxPropertyGridPageState* state = m_pState;
|
wxPropertyGridPageState* state = m_pState;
|
||||||
wxPropertyGrid* pg = state->GetGrid();
|
|
||||||
if ( pg->GetState() == state )
|
if ( state )
|
||||||
return pg->DoSelectProperty(NULL, flags);
|
{
|
||||||
else
|
wxPropertyGrid* pg = state->GetGrid();
|
||||||
state->SetSelection(NULL);
|
if ( pg->GetState() == state )
|
||||||
|
return pg->DoSelectProperty(NULL, flags);
|
||||||
|
else
|
||||||
|
state->SetSelection(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user