From cba37fd277d14c2aec3e264eb62595b1aa9f9ea7 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 11 Apr 2017 07:59:33 +0300 Subject: [PATCH] Issue #2121: Problems when editing a radius value --- src/ModuleBase/ModuleBase_WidgetEditor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 3adc21b0d..edaecab32 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -111,6 +111,11 @@ bool ModuleBase_WidgetEditor::showPopupEditor(const bool theSendSignals) isValueAccepted = editedValue(aValue, aText); if (isValueAccepted) { if (aText.isEmpty()) { + if (mySpinBox->hasVariable()) { + // variable text should be cleared before setting value as the value + // will not be set if there is a varable in control + ModuleBase_Tools::setSpinText(mySpinBox, ""); + } ModuleBase_Tools::setSpinValue(mySpinBox, aValue); } else { ModuleBase_Tools::setSpinText(mySpinBox, aText); -- 2.39.2