Regression: Apply is always disable during mirror operation when the cursor is over property panel. Using myIsResetCurrentValue instead of myIsPropertyPanelValueChanged.
{
}
-void ModuleBase_WidgetDoubleValue::reset()
+bool ModuleBase_WidgetDoubleValue::reset()
{
- if (!isUseReset())
- return;
-
- if (isComputedDefault() || mySpinBox->hasVariable()) {
- return;
- //if (myFeature->compute(myAttributeID))
- // restoreValue();
+ bool aDone = false;
+ if (!isUseReset() || isComputedDefault() || mySpinBox->hasVariable()) {
+ aDone = false;
} else {
bool isOk;
double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
if (isOk) {
ModuleBase_Tools::setSpinValue(mySpinBox, aDefValue);
storeValueCustom();
+ aDone = true;
}
}
+ return aDone;
}
bool ModuleBase_WidgetDoubleValue::storeValueCustom() const
{
}
-void ModuleBase_WidgetIntValue::reset()
+bool ModuleBase_WidgetIntValue::reset()
{
- if (!isUseReset())
- return;
-
- if (isComputedDefault()) {
- return;
- //if (myFeature->compute(myAttributeID))
- // restoreValue();
+ bool aDone = false;
+ if (!isUseReset() || isComputedDefault()) {
+ aDone = false;
} else {
bool isOk;
int aDefValue = QString::fromStdString(getDefaultValue()).toInt(&isOk);
mySpinBox->setValue(isOk ? aDefValue : 0);
mySpinBox->blockSignals(isBlocked);
storeValueCustom();
+ aDone = true;
}
}
+ return aDone;
}
bool ModuleBase_WidgetIntValue::storeValueCustom() const
virtual ~ModuleBase_WidgetIntValue();
/// Fills the widget with default values
- virtual void reset();
+ virtual bool reset();
//! Read value of corresponded attribute from data model to the input control
// \return True in success
setLayout(aLayout);
}
-void PartSet_WidgetPoint2D::reset()
+bool PartSet_WidgetPoint2D::reset()
{
- if (!isUseReset())
- return;
-
- if (isComputedDefault() || myXSpin->hasVariable() || myYSpin->hasVariable()) {
- return;
- //if (myFeature->compute(myAttributeID))
- // restoreValue();
+ bool aDone = false;
+ if (!isUseReset() || isComputedDefault() || myXSpin->hasVariable() || myYSpin->hasVariable()) {
+ aDone = false;
}
else {
bool isOk;
ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
storeValueCustom();
+ aDone = true;
}
+ return aDone;
}
PartSet_WidgetPoint2D::~PartSet_WidgetPoint2D()
virtual ~PartSet_WidgetPoint2D();
/// Fills the widget with default values
- virtual void reset();
+ virtual bool reset();
/// Set the given wrapped value to the current widget
/// This value should be processed in the widget according to the needs