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:
parent
9434a443f5
commit
273448fb80
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user