X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_WidgetEditor.cpp;h=8c3b74bdfd4f372db20791bea0838dd6aefc0502;hb=dbf43e581cd94f420a395f7347926a26218451a3;hp=7f77acd5a97ac1064fdfd533699a7e85dd71b4ad;hpb=3874b57fe5aba25ff5aee2a07654fc23c1ee8eb0;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 7f77acd5a..8c3b74bdf 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -47,6 +47,7 @@ double editedValue(double theValue, bool& isDone) ModuleBase_Tools::zeroMargins(aLay); QLineEdit* aEditor = new QLineEdit(QString::number(theValue), &aDlg); + aEditor->selectAll(); aEditor->setValidator(new QDoubleValidator(aEditor)); QObject::connect(aEditor, SIGNAL(returnPressed()), &aDlg, SLOT(accept())); aLay->addWidget(aEditor); @@ -78,9 +79,7 @@ void ModuleBase_WidgetEditor::showPopupEditor() aValue = editedValue(aValue, isDone); if (isDone) { - bool isBlocked = mySpinBox->blockSignals(true); - mySpinBox->setValue(aValue); - mySpinBox->blockSignals(isBlocked); + ModuleBase_Tools::setSpinValue(mySpinBox, aValue); } emit valuesChanged(); emit focusOutWidget(this);