From d7ec97585608cd5f8b9555b952041c1c87c1e235 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 28 Aug 2015 21:17:32 +0300 Subject: [PATCH] Issue #764 extrusionfuse - plane for sketch --- src/FeaturesPlugin/extrusionfuse_widget.xml | 1 + src/FeaturesPlugin/revolutioncut_widget.xml | 1 + src/FeaturesPlugin/revolutionfuse_widget.xml | 1 + src/PartSet/PartSet_WidgetSketchCreator.cpp | 9 +++++---- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/FeaturesPlugin/extrusionfuse_widget.xml b/src/FeaturesPlugin/extrusionfuse_widget.xml index 17ef824ba..519a22ec8 100644 --- a/src/FeaturesPlugin/extrusionfuse_widget.xml +++ b/src/FeaturesPlugin/extrusionfuse_widget.xml @@ -72,6 +72,7 @@ tooltip="Objects to Fuse" type_choice="Solids" concealment="true"> + diff --git a/src/FeaturesPlugin/revolutioncut_widget.xml b/src/FeaturesPlugin/revolutioncut_widget.xml index b45230c66..4cc39ef71 100644 --- a/src/FeaturesPlugin/revolutioncut_widget.xml +++ b/src/FeaturesPlugin/revolutioncut_widget.xml @@ -80,6 +80,7 @@ tooltip="Objects to Cut" type_choice="Solids" concealment="true"> + diff --git a/src/FeaturesPlugin/revolutionfuse_widget.xml b/src/FeaturesPlugin/revolutionfuse_widget.xml index e348ecd06..81c0f1a60 100644 --- a/src/FeaturesPlugin/revolutionfuse_widget.xml +++ b/src/FeaturesPlugin/revolutionfuse_widget.xml @@ -80,6 +80,7 @@ tooltip="Objects to Fuse" type_choice="Solids" concealment="true"> + diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index c93c58516..f7a52416e 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -198,11 +198,12 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); AttributePtr anAttribute = myFeature->attribute(anObjectsAttribute); std::string aValidatorID, anError; - if (aFactory->validate(anAttribute, aValidatorID, anError)) { - AttributeSelectionListPtr aSelList = aCompFeature->data()->selectionList(anObjectsAttribute); - aSelList->append(aRes, GeomShapePtr()); + AttributeSelectionListPtr aSelList = aCompFeature->data()->selectionList(anObjectsAttribute); + aSelList->append(aRes, GeomShapePtr()); + if (aFactory->validate(anAttribute, aValidatorID, anError)) updateObject(aCompFeature); - } + else + aSelList->clear(); } } } -- 2.39.2