diff --git a/docs/changes.txt b/docs/changes.txt index 29b3f0d36a..932f9f4c10 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 7415dafd50..e24ce063b3 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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();