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
WidgetMultiSelector preparation to use ModelAPI_AttributeRefAttrList.
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_ParamSpinBox.cpp
diff --git
a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp
b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp
index bfd0823866a868242e6e83567dd7933792166e2d..40b50fb1757ff1dca0a7f0dbbe0a3b3f88689685 100644
(file)
--- a/
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
+++ b/
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
@@
-67,7
+67,7
@@
double ModuleBase_ParamSpinBox::valueFromText(const QString& theText) const
if (!hasVariable(theText))
return ModuleBase_DoubleSpinBox::valueFromText(theText);
if (!hasVariable(theText))
return ModuleBase_DoubleSpinBox::valueFromText(theText);
- // small hack: return
lengt
h of the string to initiate valuesChanged signal
+ // small hack: return
has
h of the string to initiate valuesChanged signal
return qHash(theText);
}
return qHash(theText);
}
@@
-101,9
+101,14
@@
QValidator::State ModuleBase_ParamSpinBox::validate(QString& str, int& pos) cons
/*!
\brief This function is used to set a current value for this spinbox.
\param value current value
/*!
\brief This function is used to set a current value for this spinbox.
\param value current value
+
+ The new value is ignored if the spinbox has a variable.
*/
void ModuleBase_ParamSpinBox::setValue(const double value)
{
*/
void ModuleBase_ParamSpinBox::setValue(const double value)
{
+ if (hasVariable())
+ return;
+
myTextValue = ModuleBase_DoubleSpinBox::textFromValue(value);
ModuleBase_DoubleSpinBox::setValue(value);
}
myTextValue = ModuleBase_DoubleSpinBox::textFromValue(value);
ModuleBase_DoubleSpinBox::setValue(value);
}
@@
-214,7
+219,7
@@
bool ModuleBase_ParamSpinBox::findVariable(const QString& theName,
}
/*!
}
/*!
- \brief This function is called when the spinbox rec
ie
ves key press event.
+ \brief This function is called when the spinbox rec
ei
ves key press event.
*/
//void ModuleBase_ParamSpinBox::keyPressEvent(QKeyEvent* e)
//{
*/
//void ModuleBase_ParamSpinBox::keyPressEvent(QKeyEvent* e)
//{
@@
-226,7
+231,7
@@
bool ModuleBase_ParamSpinBox::findVariable(const QString& theName,
//}
/*!
//}
/*!
- \brief This function is called when the spinbox rec
ie
ves show event.
+ \brief This function is called when the spinbox rec
ei
ves show event.
*/
void ModuleBase_ParamSpinBox::showEvent(QShowEvent* theEvent)
{
*/
void ModuleBase_ParamSpinBox::showEvent(QShowEvent* theEvent)
{