aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-07-15 21:06:04 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-07-15 21:06:04 +0200
commit21bf78dae9ef95e65b549c60061bce9790b1b611 (patch)
tree7b0760fa1e5c837f9b43cf1c97fa9f55973a169b /gui
parent8e12ae2cfed728ee1ecab4e5f60f0435bf2d58b8 (diff)
downloadnextpnr-21bf78dae9ef95e65b549c60061bce9790b1b611.tar.gz
nextpnr-21bf78dae9ef95e65b549c60061bce9790b1b611.tar.bz2
nextpnr-21bf78dae9ef95e65b549c60061bce9790b1b611.zip
Make at least 50 of pips available in uphill/downhill
Diffstat (limited to 'gui')
-rw-r--r--gui/designwidget.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index 8b9e9d22..335ed929 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -528,17 +528,28 @@ void DesignWidget::onItemSelectionChanged()
addProperty(dhItem, QVariant::String, "Bel", belname, ElementType::BEL);
addProperty(dhItem, QVariant::String, "PortPin", pinname);
}
- /*
- QtProperty *pipsDownItem = addSubGroup(downhillItem, "Pips Downhill");
- for (const auto &item : ctx->getPipsDownhill(wire)) {
- addProperty(pipsDownItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
- }
- QtProperty *pipsUpItem = addSubGroup(downhillItem, "Pips Uphill");
- for (const auto &item : ctx->getPipsUphill(wire)) {
- addProperty(pipsUpItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
- }
- */
+ int counter = 0;
+ QtProperty *pipsDownItem = addSubGroup(downhillItem, "Pips Downhill");
+ for (const auto &item : ctx->getPipsDownhill(wire)) {
+ addProperty(pipsDownItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
+ counter++;
+ if (counter == 50) {
+ addProperty(pipsDownItem, QVariant::String, "Warning", "Too many items...", ElementType::NONE);
+ break;
+ }
+ }
+
+ counter = 0;
+ QtProperty *pipsUpItem = addSubGroup(downhillItem, "Pips Uphill");
+ for (const auto &item : ctx->getPipsUphill(wire)) {
+ addProperty(pipsUpItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
+ counter++;
+ if (counter == 50) {
+ addProperty(pipsUpItem, QVariant::String, "Warning", "Too many items...", ElementType::NONE);
+ break;
+ }
+ }
} else if (type == ElementType::PIP) {
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
PipId pip = ctx->getPipByName(c);