git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55686
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Call with NULL to de-select property
bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
{
// Call with NULL to de-select property
bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
{
+ wxPanel* canvas = GetPanel();
+
/*
if (p)
wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(),
/*
if (p)
wxLogDebug(wxT("SelectProperty( %s (%s[%i]) )"),p->m_label.c_str(),
- wxScrolledWindow::SetFocus();
+ canvas->SetFocusIgnoringChildren();
- wxASSERT_MSG( m_wndEditor->GetParent() == m_canvas,
+ wxASSERT_MSG( m_wndEditor->GetParent() == canvas,
wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") );
// Set validator, if any
wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") );
// Set validator, if any
- wxASSERT_MSG( m_wndEditor2->GetParent() == m_canvas,
+ wxASSERT_MSG( m_wndEditor2->GetParent() == canvas,
wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") );
// Get proper id for wndSecondary
wxT("CreateControls must use result of wxPropertyGrid::GetPanel() as parent of controls.") );
// Get proper id for wndSecondary
else
{
// wxGTK atleast seems to need this (wxMSW not)
else
{
// wxGTK atleast seems to need this (wxMSW not)
+ canvas->SetFocusIgnoringChildren();
}
EditorsValueWasNotModified();
}
EditorsValueWasNotModified();
+ else
+ {
+ // Make sure focus is in grid
+ canvas->SetFocusIgnoringChildren();
+ }
ClearInternalFlag(wxPG_FL_IN_SELECT_PROPERTY);
}
ClearInternalFlag(wxPG_FL_IN_SELECT_PROPERTY);
}
// Need to set focus?
if ( !(m_iFlags & wxPG_FL_FOCUSED) )
{
// Need to set focus?
if ( !(m_iFlags & wxPG_FL_FOCUSED) )
{
+ m_canvas->SetFocusIgnoringChildren();
}
wxPropertyGridPageState* state = m_pState;
}
wxPropertyGridPageState* state = m_pState;