Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #3052: Conflicting constraint after trim ellipse
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_ParamSpinBox.cpp
diff --git
a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp
b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp
index 9f784ef6e33a47d80acedf0cea680326f43d6fa8..e7836e656126d0378c8c3e5befcee38549d4de70 100644
(file)
--- a/
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
+++ b/
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-201
7
CEA/DEN, EDF R&D
+// Copyright (C) 2014-201
9
CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-12,10
+12,9
@@
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
//
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "ModuleBase_ParamSpinBox.h"
//
#include "ModuleBase_ParamSpinBox.h"
@@
-49,7
+48,7
@@
ModuleBase_ParamSpinBox::ModuleBase_ParamSpinBox(QWidget* theParent, int thePrec
myIsEquation(false),
myAcceptVariables(true),
mySingleStep(1),
myIsEquation(false),
myAcceptVariables(true),
mySingleStep(1),
- myMinimum(
DBL_MIN
),
+ myMinimum(
-DBL_MAX
),
myMaximum(DBL_MAX)
{
myCompleter = new QCompleter(this);
myMaximum(DBL_MAX)
{
myCompleter = new QCompleter(this);
@@
-162,7
+161,6
@@
void ModuleBase_ParamSpinBox::setValue(double value)
double ModuleBase_ParamSpinBox::value() const
{
double ModuleBase_ParamSpinBox::value() const
{
- std::string aa = lineEdit()->text().toStdString();
return lineEdit()->text().toDouble();
}
return lineEdit()->text().toDouble();
}
@@
-177,6
+175,12
@@
void ModuleBase_ParamSpinBox::setText(const QString& value)
lineEdit()->setText(value);
emit textChanged(value);
}
lineEdit()->setText(value);
emit textChanged(value);
}
+ else {
+ bool isConv = false;
+ double aVal = value.toDouble(&isConv);
+ if (isConv)
+ setValue(aVal);
+ }
}
/*!
}
/*!