X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_WidgetPoint2dDistance.cpp;h=0e40984766fc5af49890a7b32df41b298958473a;hb=f3f60a3cb69f2534a5837cd249782395e5edb183;hp=14ac4592178c9bb0adae1f0cc05e963d1551ec2d;hpb=2d5cbfca3d96c8251370fc563d2d675650aabd28;p=modules%2Fshaper.git 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;