From 7fce531950fca3796b798b234c4b64ef1c2edc43 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 8 Apr 2016 11:20:42 +0300 Subject: [PATCH] Issue #1393 Angle constraint : incorrect angle displayed. solution: do not select any object in the viewer when passed through point widget is active. This commit is a validator creator for such widgets(a candidate to replace WidgetValidated). It is used now for Distance of Circle widget and Flyout point of dimensional constraints. The next integration is for the bug purpose(arc's passed point) --- src/PartSet/PartSet_WidgetSketchCreator.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 131106e74..ade61b334 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -309,9 +309,11 @@ bool PartSet_WidgetSketchCreator::startSketchOperation(const QList(aValue->object()); /// sketch should not started by object(face) selected as global. If Local face is selected, /// sketch is started - if (aResult.get() && aValue->shape().get() && aResult->shape()->isEqual(aValue->shape())) - return aSketchStarted; - + if (aResult.get() && aValue->shape().get() && aResult->shape()->isEqual(aValue->shape())) { + ResultConstructionPtr aConstruction = std::dynamic_pointer_cast(aResult); + if (!aConstruction.get() || !aConstruction->isInfinite()) + return aSketchStarted; + } aSketchStarted = true; // manually deactivation because the widget was not activated as has no focus acceptin controls -- 2.39.2