1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-04-27 12:38:40 +00:00

gui: restore property navigation in tree

This commit is contained in:
Sergiusz Bazanski
2018-08-01 02:08:56 +01:00
parent bf43c27567
commit 1038b7ef23

View File

@@ -716,11 +716,11 @@ void DesignWidget::prepareMenuTree(const QPoint &pos)
void DesignWidget::onItemDoubleClicked(QTreeWidgetItem *item, int column)
{
//QtProperty *selectedProperty = propertyEditor->itemToBrowserItem(item)->property();
//ElementType type = getElementTypeByName(selectedProperty->propertyId());
//LazyTreeItem *it = treeModel->nodeForIdType(type, selectedProperty->valueText());
//if (it)
// selectionModel->setCurrentIndex(treeModel->indexFromNode(it), QItemSelectionModel::ClearAndSelect);
QtProperty *selectedProperty = propertyEditor->itemToBrowserItem(item)->property();
ElementType type = getElementTypeByName(selectedProperty->propertyId());
auto it = treeModel->nodeForIdType(type, ctx->id(selectedProperty->valueText().toStdString()));
if (it)
selectionModel->setCurrentIndex(treeModel->indexFromNode(*it), QItemSelectionModel::ClearAndSelect);
}
void DesignWidget::onDoubleClicked(const QModelIndex &index) { Q_EMIT zoomSelected(); }