Keep wxPGProperty editor focused while refreshing the property

Active property's editor should remain focused after refreshing the property.
This commit is contained in:
Artur Wieczorek
2018-11-11 11:19:29 +01:00
parent d27a1b2770
commit 4e2d26b22e

View File

@@ -2590,7 +2590,11 @@ void wxPropertyGrid::RefreshProperty( wxPGProperty* p )
{
// NB: We must copy the selection.
wxArrayPGProperty selection = m_pState->m_selection;
DoSetSelection(selection, wxPG_SEL_FORCE);
int selFlags = wxPG_SEL_FORCE;
// We want to keep property's editor focused.
if ( IsEditorFocused() )
selFlags |= wxPG_SEL_FOCUS;
DoSetSelection(selection, selFlags);
}
DrawItemAndChildren(p);