git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62946
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxPropertyGrid::HandleFocusChange( wxWindow* newFocused )
{
unsigned int oldFlags = m_iFlags;
void wxPropertyGrid::HandleFocusChange( wxWindow* newFocused )
{
unsigned int oldFlags = m_iFlags;
+ bool wasEditorFocused = false;
+ wxWindow* wndEditor = m_wndEditor;
m_iFlags &= ~(wxPG_FL_FOCUSED);
m_iFlags &= ~(wxPG_FL_FOCUSED);
// This must be one of nextFocus' parents.
while ( parent )
{
// This must be one of nextFocus' parents.
while ( parent )
{
+ if ( parent == wndEditor )
+ {
+ wasEditorFocused = true;
+ }
// Use m_eventObject, which is either wxPropertyGrid or
// wxPropertyGridManager, as appropriate.
// Use m_eventObject, which is either wxPropertyGrid or
// wxPropertyGridManager, as appropriate.
- if ( parent == m_eventObject )
+ else if ( parent == m_eventObject )
{
m_iFlags |= wxPG_FL_FOCUSED;
break;
{
m_iFlags |= wxPG_FL_FOCUSED;
break;
parent = parent->GetParent();
}
parent = parent->GetParent();
}
+ // Notify editor control when it receives a focus
+ if ( wasEditorFocused && m_curFocused != newFocused )
+ {
+ wxPGProperty* p = GetSelection();
+ if ( p )
+ {
+ const wxPGEditor* editor = p->GetEditorClass();
+ editor->OnFocus(p, GetEditorControl());
+ }
+ }
+
m_curFocused = newFocused;
if ( (m_iFlags & wxPG_FL_FOCUSED) !=
m_curFocused = newFocused;
if ( (m_iFlags & wxPG_FL_FOCUSED) !=