From 8db19778a09954e7c0b4803bdfc40509de0403fd Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 26 Jul 2018 18:48:07 +0200 Subject: Fix name clash for ecp5 --- ecp5/arch.h | 2 +- ecp5/bitstream.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ecp5/arch.h b/ecp5/arch.h index d9d29c76..b6aac9cf 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -752,7 +752,7 @@ struct Arch : BaseCtx return chip_info->tiletype_names[locInfo(pip)->pip_data[pip.index].tile_type].get(); } - int8_t getPipType(PipId pip) const { return locInfo(pip)->pip_data[pip.index].pip_type; } + int8_t getPipClass(PipId pip) const { return locInfo(pip)->pip_data[pip.index].pip_type; } BelId getPackagePinBel(const std::string &pin) const; std::string getBelPackagePin(BelId bel) const; diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc index f87b7038..df9b12d5 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -174,7 +174,7 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex // Add all set, configurable pips to the config for (auto pip : ctx->getPips()) { if (ctx->getBoundPipNet(pip) != IdString()) { - if (ctx->getPipType(pip) == 0) { // ignore fixed pips + if (ctx->getPipClass(pip) == 0) { // ignore fixed pips std::string tile = empty_chip.get_tile_by_position_and_type(pip.location.y, pip.location.x, ctx->getPipTiletype(pip)); std::string source = get_trellis_wirename(ctx, pip.location, ctx->getPipSrcWire(pip)); -- cgit v1.2.3 From e5acd80247264fed41dfc1e7e07efa8a10a67fae Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 26 Jul 2018 19:32:21 +0200 Subject: Added back select on property list --- gui/designwidget.cc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 2bba8532..43964edf 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -824,6 +824,19 @@ void DesignWidget::prepareMenuProperty(const QPoint &pos) } QMenu menu(this); + QAction *selectAction = new QAction("&Select", this); + connect(selectAction, &QAction::triggered, this, [this, items] { + std::vector decals; + for (auto clickItem : items) { + IdString value = static_cast(clickItem)->getData(); + ElementType type = static_cast(clickItem)->getType(); + std::vector d = getDecals(type, value); + std::move(d.begin(), d.end(), std::back_inserter(decals)); + } + Q_EMIT selected(decals); + }); + menu.addAction(selectAction); + QMenu *subMenu = menu.addMenu("Highlight"); QActionGroup *group = new QActionGroup(this); group->setExclusive(true); @@ -876,14 +889,8 @@ void DesignWidget::onItemDoubleClicked(QTreeWidgetItem *item, int column) ElementType type = getElementTypeByName(selectedProperty->propertyId()); QString value = selectedProperty->valueText(); int index = getElementIndex(type); - switch (type) { - case ElementType::NONE: - return; - default: { - if (nameToItem[index].contains(value)) - treeWidget->setCurrentItem(nameToItem[index].value(value)); - } break; - } + if (type != ElementType::NONE && nameToItem[index].contains(value)) + treeWidget->setCurrentItem(nameToItem[index].value(value)); } NEXTPNR_NAMESPACE_END -- cgit v1.2.3