Fix a bug in TraceSelector that prevented adding child items with return
It's now possible to also add single banks with the return key.
This commit is contained in:
@@ -93,6 +93,18 @@ void TraceAvailableTree::keyPressEvent(QKeyEvent *event)
|
||||
|
||||
selectedTree->addTopLevelItem(clonedItem);
|
||||
}
|
||||
|
||||
// Also add child items that could be selected.
|
||||
for (unsigned int i = 0; i < currentItem->childCount(); i++)
|
||||
{
|
||||
auto currentChildItem = static_cast<TraceSelectorTreeItem *>(currentItem->child(i));
|
||||
|
||||
if (currentChildItem->isSelected())
|
||||
{
|
||||
auto clonedItem = new TraceSelectorTreeItem(*currentChildItem);
|
||||
selectedTree->addTopLevelItem(clonedItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Q_EMIT selectedTree->itemsChanged();
|
||||
|
||||
Reference in New Issue
Block a user