]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #764 extrusionfuse - plane for sketch
authornds <nds@opencascade.com>
Fri, 28 Aug 2015 18:17:32 +0000 (21:17 +0300)
committernds <nds@opencascade.com>
Fri, 28 Aug 2015 18:17:32 +0000 (21:17 +0300)
src/FeaturesPlugin/extrusionfuse_widget.xml
src/FeaturesPlugin/revolutioncut_widget.xml
src/FeaturesPlugin/revolutionfuse_widget.xml
src/PartSet/PartSet_WidgetSketchCreator.cpp

index 17ef824ba0d03834cb80466684431012786d3341..519a22ec8692ea2f8f6aa5d1bd23e5297c7df797 100644 (file)
@@ -72,6 +72,7 @@
     tooltip="Objects to Fuse"
     type_choice="Solids"
     concealment="true">
+    <validator id="GeomValidators_ShapeType" parameters="solid"/>
   </multi_selector>
   <validator id="GeomValidators_ZeroOffset" parameters="CreationMethod,BySizes,to_size,from_size,to_object,to_offset,from_object,from_offset"/>
 </source>
index b45230c6671727548b0985483276fa40cb4fa9ec..4cc39ef710c54cce85ee62e664788e671a3ad763 100644 (file)
@@ -80,6 +80,7 @@
     tooltip="Objects to Cut"
     type_choice="Solids"
     concealment="true">
+    <validator id="GeomValidators_ShapeType" parameters="solid"/>
   </multi_selector>
   <validator id="GeomValidators_ZeroOffset" parameters="CreationMethod,ByAngles,to_angle,from_angle,to_object,to_offset,from_object,from_offset"/>
 </source>
index e348ecd06afb818923f7afbe259efc235f361234..81c0f1a6061b7bc2ac7fdc8f38fba25f9473291d 100644 (file)
@@ -80,6 +80,7 @@
     tooltip="Objects to Fuse"
     type_choice="Solids"
     concealment="true">
+    <validator id="GeomValidators_ShapeType" parameters="solid"/>
   </multi_selector>
   <validator id="GeomValidators_ZeroOffset" parameters="CreationMethod,ByAngles,to_angle,from_angle,to_object,to_offset,from_object,from_offset"/>
 </source>
index c93c585168ca2800627b4d90a8a265956f4d1ae5..f7a52416e4597dfd8c20d04e28b7ab0743378680 100644 (file)
@@ -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();
       }
     }
   }