From 84468fbc25bdf1272fb68d98f7e2b28b1dffa4a8 Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Tue, 1 Apr 2025 10:34:19 +0200 Subject: [PATCH] [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. --- src/Gui/Dialogs/DlgAddPropertyVarSet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/Dialogs/DlgAddPropertyVarSet.cpp b/src/Gui/Dialogs/DlgAddPropertyVarSet.cpp index 1b505e7365..a974ac4fdf 100644 --- a/src/Gui/Dialogs/DlgAddPropertyVarSet.cpp +++ b/src/Gui/Dialogs/DlgAddPropertyVarSet.cpp @@ -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(layout());