]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix focus at the end of a property label edit (needed at least for wxGTK)
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 25 Mar 2010 15:55:01 +0000 (15:55 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 25 Mar 2010 15:55:01 +0000 (15:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp

index 6e96206ff5f827a8d8258b653551bb1d887fdf4f..fbaacd49ac692645c005f9850e769e64f5fe16bb 100644 (file)
@@ -1071,11 +1071,17 @@ void wxPropertyGrid::DoEndLabelEdit( bool commit, int selFlags )
     }
 
     m_selColumn = 1;
     }
 
     m_selColumn = 1;
+    int wasFocused = m_iFlags & wxPG_FL_FOCUSED;
 
     DestroyEditorWnd(m_labelEditor);
 
     DestroyEditorWnd(m_labelEditor);
+
     m_labelEditor = NULL;
     m_labelEditorProperty = NULL;
 
     m_labelEditor = NULL;
     m_labelEditorProperty = NULL;
 
+    // Fix focus (needed at least on wxGTK)
+    if ( wasFocused )
+        SetFocusOnCanvas();
+
     DrawItem(prop);
 }
 
     DrawItem(prop);
 }