From 0cedb7276f94167fe758c9f1a241f33cb21cfafc Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 23 Jun 2018 20:25:10 +0200 Subject: display type in properties --- gui/designwidget.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/designwidget.cc b/gui/designwidget.cc index c2bc158d..8c5132e2 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -188,9 +188,15 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) if (type == ElementType::BEL) { IdString c = static_cast(item)->getData(); + BelType type = ctx->getBelType(ctx->getBelByName(c)); QtVariantProperty *topItem = variantManager->addProperty(QVariant::String, QString("Name")); topItem->setValue(QString(c.c_str(ctx))); addProperty(topItem, QString("Name")); + + QtVariantProperty *typeItem = variantManager->addProperty(QVariant::String, QString("Type")); + typeItem->setValue(QString(ctx->belTypeToId(type).c_str(ctx))); + addProperty(typeItem, QString("Type")); + } else if (type == ElementType::WIRE) { IdString c = static_cast(item)->getData(); -- cgit v1.2.3