From 18e543ea9d4c6495932bf0912df23eb5429bcfe8 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Thu, 25 Mar 2010 15:55:01 +0000 Subject: [PATCH] Fix focus at the end of a property label edit (needed at least for wxGTK) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 6e96206..fbaacd4 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1071,11 +1071,17 @@ void wxPropertyGrid::DoEndLabelEdit( bool commit, int selFlags ) } m_selColumn = 1; + int wasFocused = m_iFlags & wxPG_FL_FOCUSED; DestroyEditorWnd(m_labelEditor); + m_labelEditor = NULL; m_labelEditorProperty = NULL; + // Fix focus (needed at least on wxGTK) + if ( wasFocused ) + SetFocusOnCanvas(); + DrawItem(prop); } -- 2.7.4