Make at least 50 of pips available in uphill/downhill
This commit is contained in:
parent
8e12ae2cfe
commit
21bf78dae9
@ -528,17 +528,28 @@ void DesignWidget::onItemSelectionChanged()
|
|||||||
addProperty(dhItem, QVariant::String, "Bel", belname, ElementType::BEL);
|
addProperty(dhItem, QVariant::String, "Bel", belname, ElementType::BEL);
|
||||||
addProperty(dhItem, QVariant::String, "PortPin", pinname);
|
addProperty(dhItem, QVariant::String, "PortPin", pinname);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
int counter = 0;
|
||||||
QtProperty *pipsDownItem = addSubGroup(downhillItem, "Pips Downhill");
|
QtProperty *pipsDownItem = addSubGroup(downhillItem, "Pips Downhill");
|
||||||
for (const auto &item : ctx->getPipsDownhill(wire)) {
|
for (const auto &item : ctx->getPipsDownhill(wire)) {
|
||||||
addProperty(pipsDownItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
|
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");
|
QtProperty *pipsUpItem = addSubGroup(downhillItem, "Pips Uphill");
|
||||||
for (const auto &item : ctx->getPipsUphill(wire)) {
|
for (const auto &item : ctx->getPipsUphill(wire)) {
|
||||||
addProperty(pipsUpItem, QVariant::String, "", ctx->getPipName(item).c_str(ctx), ElementType::PIP);
|
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) {
|
} else if (type == ElementType::PIP) {
|
||||||
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
|
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
|
||||||
PipId pip = ctx->getPipByName(c);
|
PipId pip = ctx->getPipByName(c);
|
||||||
|
Loading…
Reference in New Issue
Block a user