From 2e3407de5c888a329bfa073b17fbb0462b3f4135 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Mar 2012 00:29:21 +0000 Subject: [PATCH] Fix assert when editing an item in multi-selection wxTreeCtrl. Don't use GetSelection() in wxTreeCtrl EVT_CHAR_HOOK handler as it can only be used with single selection controls and results in an assert when used with multi-selection ones. Simply use GetFocusedItem() instead. Closes #14062. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/treebase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp index 4c0965c435..f831b489ad 100644 --- a/src/common/treebase.cpp +++ b/src/common/treebase.cpp @@ -363,7 +363,7 @@ void wxTreeCtrlBase::OnCharHook(wxKeyEvent& event) // fall through case WXK_RETURN: - EndEditLabel(GetSelection(), discardChanges); + EndEditLabel(GetFocusedItem(), discardChanges); // Do not call Skip() below. return; -- 2.45.2