[Core] Show units in value editor VarSet dialog

Before this change, the units were not shown in the editor for values.
With this change the units (if applicable) are shown in the editor.
This commit is contained in:
Pieter Hijma
2025-04-01 10:34:19 +02:00
parent 4071f32c90
commit 7271d63650

View File

@@ -251,7 +251,9 @@ void DlgAddPropertyVarSet::addEditor(PropertyEditor::PropertyItem* propertyItem,
editor.reset(propertyItem->createEditor(this, [this]() {
this->valueChanged();
}));
propertyItem->setEditorData(editor.get(), QVariant());
propertyItem->setEditorData(
editor.get(),
propertyItem->data(PropertyEditor::PropertyItem::ValueColumn, Qt::EditRole));
editor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
editor->setObjectName(QStringLiteral("editor"));
auto formLayout = qobject_cast<QFormLayout*>(layout());