From: nds Date: Wed, 23 Dec 2015 08:44:43 +0000 (+0300) Subject: issue #1152 arc validation problem X-Git-Tag: V_2.1.0~101 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29cfe0a9ce36e9d1b5ec2fb0c8c4f395cab02a1a;p=modules%2Fshaper.git issue #1152 arc validation problem in additional, it is corrected that the external object is immediately visualized in the viewer after the end point click. --- diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 5af914ad3..e8555daed 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -383,11 +383,17 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous else { if (getPoint2d(aView, aShape, aX, aY)) setPoint(aX, aY); + else + setValueState(Stored); // in case of edge selection, Apply state should also be updated bool anOrphanPoint = aShape.ShapeType() == TopAbs_VERTEX || isOrphanPoint(aSelectedFeature, mySketch, aX, aY); setConstraintWith(aObject); - if (!anOrphanPoint) + // fignal updated should be flushed in order to visualize possible created external objects + // e.g. selection of trihedron axis when input end arc point + updateObject(feature()); + if (!anOrphanPoint && !anExternal) emit vertexSelected(); + emit focusOutWidget(this); } } @@ -409,8 +415,10 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aX, aY); } else if (aShape.ShapeType() == TopAbs_EDGE) { - if (MyFeaturesForCoincedence.contains(myFeature->getKind().c_str())) + if (MyFeaturesForCoincedence.contains(myFeature->getKind().c_str())) { setConstraintWith(aObject); + setValueState(Stored); // in case of edge selection, Apply state should also be updated + } } // it is important to perform updateObject() in order to the current value is // processed by Sketch Solver. Test case: line is created from a previous point @@ -419,7 +427,7 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous // points of the line becomes less than the tolerance. Validator of the line returns // false, the line will be aborted, but sketch stays valid. updateObject(feature()); - if (!anOrphanPoint) + if (!anOrphanPoint && !anExternal) emit vertexSelected(); emit focusOutWidget(this); } diff --git a/src/XGUI/XGUI_ViewerProxy.cpp b/src/XGUI/XGUI_ViewerProxy.cpp index d0b6779e8..6233d28ff 100644 --- a/src/XGUI/XGUI_ViewerProxy.cpp +++ b/src/XGUI/XGUI_ViewerProxy.cpp @@ -29,7 +29,7 @@ void XGUI_ViewerProxy::connectViewProxy() SIGNAL(trihedronVisibilityChanged(bool))); #else connect(myWorkshop->mainWindow()->viewer(), SIGNAL(trihedronVisibilityChanged(bool)), - SLOT(trihedronVisibilityChanged(bool))); + SIGNAL(trihedronVisibilityChanged(bool))); #endif }