diff --git a/README.md b/README.md index 66e2bcc2..195f08c3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Prequisites - Modern C++11 compiler (`clang-format` required for development) - Qt5 or later (`qt5-default` for Ubuntu 16.04) - Python 3.5 or later, including development libraries (`python3-dev` for Ubuntu) + - on Windows make sure to install same version as supported by [vcpkg](https://github.com/Microsoft/vcpkg/blob/master/ports/python3/CONTROL) - Boost libraries (`libboost-dev` or `libboost-all-dev` for Ubuntu) - Icestorm, with chipdbs installed in `/usr/local/share/icebox` - Latest git Yosys is required to synthesise the demo design diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 1a5e2962..4922074b 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -266,19 +266,19 @@ void DesignWidget::clearProperties() idToProperty.clear(); } -void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) +void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos) { - if (!item->parent()) + if (!clickItem->parent()) return; - ElementType type = static_cast(item)->getType(); + ElementType type = static_cast(clickItem)->getType(); if (type == ElementType::NONE) { return; } clearProperties(); if (type == ElementType::BEL) { - IdString c = static_cast(item)->getData(); + IdString c = static_cast(clickItem)->getData(); BelId bel = ctx->getBelByName(c); QtProperty *topItem = groupManager->addProperty("Bel"); @@ -305,7 +305,7 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) topItem->addSubProperty(conflictItem); } else if (type == ElementType::WIRE) { - IdString c = static_cast(item)->getData(); + IdString c = static_cast(clickItem)->getData(); WireId wire = ctx->getWireByName(c); QtProperty *topItem = groupManager->addProperty("Wire"); @@ -379,7 +379,7 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) } } else if (type == ElementType::PIP) { - IdString c = static_cast(item)->getData(); + IdString c = static_cast(clickItem)->getData(); PipId pip = ctx->getPipByName(c); QtProperty *topItem = groupManager->addProperty("Pip"); @@ -426,7 +426,7 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) delayItem->addSubProperty(avgDelayItem); } else if (type == ElementType::NET) { - IdString c = static_cast(item)->getData(); + IdString c = static_cast(clickItem)->getData(); NetInfo *net = ctx->nets.at(c).get(); QtProperty *topItem = groupManager->addProperty("Net"); @@ -511,7 +511,7 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *item, int pos) } } else if (type == ElementType::CELL) { - IdString c = static_cast(item)->getData(); + IdString c = static_cast(clickItem)->getData(); CellInfo *cell = ctx->cells.at(c).get(); QtProperty *topItem = groupManager->addProperty("Cell");