From: nds Date: Thu, 12 Mar 2015 08:54:04 +0000 (+0300) Subject: Constuction sketch entity attribute. X-Git-Tag: V_1.1.0~140^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b97f041cc7dc1ad9b75046889264de03033839f4;p=modules%2Fshaper.git Constuction sketch entity attribute. Store the value by reset(), in order to do not show the previous values by apply/auxiliary attribute change. --- diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 20c798187..4053a2a4b 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -104,6 +104,7 @@ void ModuleBase_WidgetDoubleValue::reset() bool isOk; double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk); ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0); + storeValueCustom(); } } diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index d7cca143c..b55c62ad1 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -163,6 +163,10 @@ void PartSet_SketcherMgr::onLeaveViewPort() { 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; diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index d011bb5d2..4104331df 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -112,6 +112,7 @@ void PartSet_WidgetPoint2D::reset() // locking of the validating state. ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0); ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0); + storeValueCustom(); } } diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index 14ac45921..0e4098476 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -47,6 +47,7 @@ void PartSet_WidgetPoint2dDistance::reset() double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk); ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0); + storeValueCustom(); } void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature, @@ -89,6 +90,10 @@ void PartSet_WidgetPoint2dDistance::deactivate() 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;