From fb79efd531e66e1033fe7314a773a52f68b78797 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Oct 2014 01:52:24 +0000 Subject: [PATCH] Send events when toggling wxPropertyGrid nodes from keyboard. Closes #15899. [This is the backport of r75665 from trunk.] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/propgrid/propgrid.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 3e56f5975f..1907175fa1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -593,6 +593,7 @@ All (GUI): - Return correct value from wxCommandEvent::GetString() for programmatically generated wxEVT_TEXT events from wxComboBox. - Accept "default" as font family value in XRC (pieleric). +- Send events when toggling wxPropertyGrid nodes from keyboard (Armel Asselin). wxGTK: diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 7b77965d4b..925c2bf6fa 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -5675,12 +5675,12 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild ) { if ( action == wxPG_ACTION_COLLAPSE_PROPERTY || secondAction == wxPG_ACTION_COLLAPSE_PROPERTY ) { - if ( (m_windowStyle & wxPG_HIDE_MARGIN) || Collapse(p) ) + if ( (m_windowStyle & wxPG_HIDE_MARGIN) || DoCollapse(p, true) ) wasHandled = true; } else if ( action == wxPG_ACTION_EXPAND_PROPERTY || secondAction == wxPG_ACTION_EXPAND_PROPERTY ) { - if ( (m_windowStyle & wxPG_HIDE_MARGIN) || Expand(p) ) + if ( (m_windowStyle & wxPG_HIDE_MARGIN) || DoExpand(p, true) ) wasHandled = true; } }