From 906fc0e60bd642db686749b7cf14fda745514a76 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 2 Jun 2014 07:45:16 +0400 Subject: [PATCH] =?utf8?q?#refs=2076=20-=20reported=20by=20Herv=C3=A9=20Le?= =?utf8?q?grand:=20Edit=20Sketch=20as=20Constructions=20child=20-=20crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In additional isModelObject() method is added. The bug functionality is in Module::edit(). The feature is obtained from the model object if it is. --- src/XGUI/XGUI_Workshop.cpp | 3 --- 1 file changed, 3 deletions(-) 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(); } -- 2.39.2