]> git.saurik.com Git - wxWidgets.git/commitdiff
Keyboard handling was blocked by label editor. Also try to maintain label editor...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Jun 2010 09:47:25 +0000 (09:47 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 12 Jun 2010 09:47:25 +0000 (09:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgrid.cpp

index 1500ccc3767e527b6a873380460b33d086f3fe39..f734d40507c940274c776eea6c171b99833650e8 100644 (file)
@@ -1022,14 +1022,13 @@ void wxPropertyGrid::OnLabelEditorKeyPress( wxKeyEvent& event )
 {
     int keycode = event.GetKeyCode();
 
-    // If key code was registered as action trigger, then trigger that action
     if ( keycode == WXK_ESCAPE )
     {
         DoEndLabelEdit(false);
     }
     else
     {
-        event.Skip();
+        HandleKeyEvent(event, true);
     }
 }
 
@@ -5612,11 +5611,26 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
             p = wxPropertyGridIterator::OneStep( m_pState, wxPG_ITERATE_VISIBLE, p, selectDir );
             if ( p )
             {
-                // If editor was focused, then make the next editor focused as well
                 int selFlags = 0;
+                int reopenLabelEditorCol = -1;
+
                 if ( editorFocused )
+                {
+                    // If editor was focused, then make the next editor
+                    // focused as well
                     selFlags |= wxPG_SEL_FOCUS;
+                }
+                else
+                {
+                    // Also maintain the same label editor focus state
+                    if ( m_labelEditor )
+                        reopenLabelEditorCol = m_selColumn;
+                }
+
                 DoSelectProperty(p, selFlags);
+
+                if ( reopenLabelEditorCol >= 0 )
+                    DoBeginLabelEdit(reopenLabelEditorCol);
             }
             wasHandled = true;
         }