From: nds Date: Mon, 2 Jun 2014 03:45:16 +0000 (+0400) Subject: #refs 76 - reported by Hervé Legrand: Edit Sketch as Constructions child - crash X-Git-Tag: V_0.4.4~336^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=906fc0e60bd642db686749b7cf14fda745514a76;p=modules%2Fshaper.git #refs 76 - reported by Hervé Legrand: Edit Sketch as Constructions child - crash In additional isModelObject() method is added. The bug functionality is in Module::edit(). The feature is obtained from the model object if it is. --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 6ec130cc7..f42b21c69 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -738,7 +738,6 @@ void XGUI_Workshop::changeCurrentDocument(FeaturePtr thePart) if (thePart) { DocumentPtr aFeaDoc; if (!XGUI_Tools::isModelObject(thePart)) { - //if (thePart->data()) { aFeaDoc = thePart->data()->docRef("PartDocument")->value(); } else { ObjectPtr aObject = boost::dynamic_pointer_cast(thePart); @@ -806,7 +805,6 @@ void XGUI_Workshop::deleteFeatures(QFeatureList theList) if (aFeature->getKind() == "Part") { DocumentPtr aDoc; if (!XGUI_Tools::isModelObject(aFeature)) { - //if (aFeature->data()) { aDoc = aFeature->data()->docRef("PartDocument")->value(); } else { ObjectPtr aObject = boost::dynamic_pointer_cast(aFeature); @@ -818,7 +816,6 @@ void XGUI_Workshop::deleteFeatures(QFeatureList theList) } } else { if (XGUI_Tools::isModelObject(aFeature)) { - //if (!aFeature->data()) { ObjectPtr aObject = boost::dynamic_pointer_cast(aFeature); aFeature = aObject->featureRef(); }