Store the value by reset(), in order to do not show the previous values by apply/auxiliary attribute change.
bool isOk;
double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0);
+ storeValueCustom();
}
}
{
if (!isNestedCreateOperation(getCurrentOperation()))
return;
+ // the method should be performed if the popup menu is called,
+ // the reset of the current widget should not happen
+ if (myIsPopupMenuActive)
+ return;
myIsMouseOverViewProcessed = false;
myIsMouseOverWindow = false;
// locking of the validating state.
ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
+ storeValueCustom();
}
}
double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0);
+ storeValueCustom();
}
void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature,
void PartSet_WidgetPoint2dDistance::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
{
+ // the contex menu release by the right button should not be processed by this widget
+ if (theEvent->button() != Qt::LeftButton)
+ return;
+
gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());
double aX, aY;