]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix child selection in multi-selection generic wxTreeCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Jan 2012 00:44:47 +0000 (00:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Jan 2012 00:44:47 +0000 (00:44 +0000)
The children which are not currently shown on the screen shouldn't be affected
by Shift-selecting in multi-selection control.

Closes #1312.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/generic/treectlg.cpp

index 29b3f0d36a813f04516aa6a7fceb560e5872a884..932f9f4c10a81d1b63940ee10f3d80f05bc323f5 100644 (file)
@@ -463,6 +463,7 @@ All (GUI):
 - Improve row/column selection modes in wxGrid (joostn).
 - Allow using wxEVT_UPDATE_UI with wxRibbonButtonBar (Emilien Kia).
 - Add wxRibbonButtonBar::InsertXXXButton() methods (Emilien Kia).
+- Fix multiple item selection in generic wxTreeCtrl (Igor Korot).
 
 GTK:
 
index 7415dafd5049f8025343c5d5c46001a42285c0b7..e24ce063b37c478149d21cd5642c5de8717f1b4e 100644 (file)
@@ -2054,7 +2054,8 @@ wxGenericTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item,
     if (crt_item==last_item)
         return true;
 
-    if (crt_item->HasChildren())
+    // We should leave the not shown children of collapsed items alone.
+    if (crt_item->HasChildren() && crt_item->IsExpanded())
     {
         wxArrayGenericTreeItems& children = crt_item->GetChildren();
         size_t count = children.GetCount();