node: implement array start offset

This commit is contained in:
itsmattkc
2022-07-17 14:48:00 -07:00
parent 04c1693297
commit 4c71a33b7b
3 changed files with 3 additions and 2 deletions
@@ -304,7 +304,7 @@ void NodeParamViewItemBody::Retranslate()
if (ic.IsArray() && ic.element() >= 0) {
// Make the label the array index
i.value().main_label->setText(tr("%1:").arg(ic.element()));
i.value().main_label->setText(tr("%1:").arg(ic.element() + ic.GetProperty(QStringLiteral("arraystart")).toInt()));
} else {
// Set to the input's name
i.value().main_label->setText(tr("%1:").arg(ic.name()));
+1 -1
View File
@@ -373,7 +373,7 @@ void NodeViewItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
if (element_ == -1) {
node_name = node_->GetInputName(input_);
} else {
node_name = QString::number(element_);
node_name = QString::number(element_ + node_->GetInputProperty(input_, QStringLiteral("arraystart")).toInt());
}
}