diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-26 00:54:04 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-26 00:54:04 +0000 |
commit | f78a74b9cff79a41f992cfaf20deb88054ea27a6 (patch) | |
tree | 5086d59b3be9b4a0b6b3959955db79dc7c5f0bd9 /gui | |
parent | 7a8e8999d21205044e707a2765dc444531d69cef (diff) | |
parent | 950f33c1bb6260f830e6974583d0e1424146b386 (diff) | |
download | nextpnr-f78a74b9cff79a41f992cfaf20deb88054ea27a6.tar.gz nextpnr-f78a74b9cff79a41f992cfaf20deb88054ea27a6.tar.bz2 nextpnr-f78a74b9cff79a41f992cfaf20deb88054ea27a6.zip |
Merge branch 'eddieh/idstring_speedup' into 'master'
Reduce id() lookups for commonly used update_budget()
See merge request SymbioticEDA/nextpnr!20
Diffstat (limited to 'gui')
-rw-r--r-- | gui/designwidget.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc index 93b53926..c17990a5 100644 --- a/gui/designwidget.cc +++ b/gui/designwidget.cc @@ -319,7 +319,7 @@ void DesignWidget::newContext(Context *ctx) pip_root->setText(0, "Pips");
pip_root->setFlags(pip_root->flags() & ~Qt::ItemIsSelectable);
treeWidget->insertTopLevelItem(0, pip_root);
-#ifndef ARCH_ECP5
+#ifndef ARCH_ECP5
if (ctx) {
for (auto pip : ctx->getPips()) {
auto id = ctx->getPipName(pip);
@@ -346,7 +346,7 @@ void DesignWidget::newContext(Context *ctx) for (auto pip : nameToItem[2].toStdMap()) {
pip_root->addChild(pip.second);
}
-#endif
+#endif
nets_root = new QTreeWidgetItem(treeWidget);
nets_root->setText(0, "Nets");
@@ -512,8 +512,7 @@ void DesignWidget::onItemSelectionChanged() if (treeWidget->selectedItems().size() == 0)
return;
- if (treeWidget->selectedItems().size() > 1)
- {
+ if (treeWidget->selectedItems().size() > 1) {
std::vector<DecalXY> decals;
for (auto clickItem : treeWidget->selectedItems()) {
IdString value = static_cast<IdStringTreeItem *>(clickItem)->getData();
|