Fix Qt implementation of wxTreeCtrl::Toggle()

It was mistakenly implemented as toggling selected item, not whether
item is collapsed or expanded.

Closes https://github.com/wxWidgets/wxWidgets/pull/1395
This commit is contained in:
Matthew Griffin 2019-07-08 16:53:55 +01:00 committed by Vadim Zeitlin
parent 9434a443f5
commit 273448fb80

View File

@ -1158,7 +1158,7 @@ void wxTreeCtrl::Toggle(const wxTreeItemId& item)
wxCHECK_RET(item.IsOk(), "invalid tree item");
QTreeWidgetItem *qTreeItem = wxQtConvertTreeItem(item);
qTreeItem->setSelected(!qTreeItem->isSelected());
qTreeItem->setExpanded(!qTreeItem->isExpanded());
}
void wxTreeCtrl::Unselect()