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:
parent
6d9407fec4
commit
3c5c6707de
@ -361,11 +361,16 @@ bool wxPropertyGridInterface::ClearSelection( bool validation )
|
||||
flags |= wxPG_SEL_NOVALIDATE;
|
||||
|
||||
wxPropertyGridPageState* state = m_pState;
|
||||
wxPropertyGrid* pg = state->GetGrid();
|
||||
if ( pg->GetState() == state )
|
||||
return pg->DoSelectProperty(NULL, flags);
|
||||
else
|
||||
state->SetSelection(NULL);
|
||||
|
||||
if ( state )
|
||||
{
|
||||
wxPropertyGrid* pg = state->GetGrid();
|
||||
if ( pg->GetState() == state )
|
||||
return pg->DoSelectProperty(NULL, flags);
|
||||
else
|
||||
state->SetSelection(NULL);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user