From: nds Date: Tue, 17 Mar 2015 14:48:24 +0000 (+0300) Subject: Multi-selection widget to be used in the extrusion feature. X-Git-Tag: V_1.1.0~118 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c8b86ad3b0fe231bf4b883d12d363b6897cef582;p=modules%2Fshaper.git Multi-selection widget to be used in the extrusion feature. Crash fix. --- diff --git a/src/PartSet/PartSet_WidgetShapeSelector.cpp b/src/PartSet/PartSet_WidgetShapeSelector.cpp index 44962e590..93aac5e0c 100644 --- a/src/PartSet/PartSet_WidgetShapeSelector.cpp +++ b/src/PartSet/PartSet_WidgetShapeSelector.cpp @@ -20,15 +20,12 @@ bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObje ObjectPtr aSelectedObject = theSelectedObject; GeomShapePtr aShape = theShape; - if (!aSelectedObject) - return false; - FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aSelectedObject); if (aSelectedFeature == myFeature) // In order to avoid selection of the same object return false; std::shared_ptr aSPFeature = std::dynamic_pointer_cast(aSelectedFeature); - if ((!aSPFeature) && (!aShape->isNull())) { + if (aSPFeature.get() != NULL && aShape.get() != NULL && !aShape->isNull()) { // Processing of external (non-sketch) object ObjectPtr aObj = PartSet_Tools::createFixedObjectByExternal(aShape->impl(), aSelectedObject, mySketch); @@ -56,7 +53,6 @@ bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObje aRefAttr->setAttr(aPntAttr); else if (aSelectedObject) aRefAttr->setObject(aSelectedObject); - //updateObject(myFeature); return true; } } @@ -64,4 +60,3 @@ bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObje return ModuleBase_WidgetShapeSelector::storeAttributeValues(aSelectedObject, aShape); } -