From dd49636265af78543a695ce25d16c014ae43a2fd Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 24 Aug 2015 19:16:58 +0300 Subject: [PATCH] Issue #838: Use only original part results for getting sub-document of a Part (not use placement results) --- src/XGUI/XGUI_DataModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 13653e5f3..2f0672cfe 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -37,7 +37,10 @@ ResultPartPtr getPartResult(ModelAPI_Object* theObj) if (aFeature) { ResultPtr aRes = aFeature->firstResult(); if (aRes.get() && (aRes->groupName() == ModelAPI_ResultPart::group())) { - return std::dynamic_pointer_cast(aRes); + ResultPartPtr aPartRes = std::dynamic_pointer_cast(aRes); + // Use only original parts, not a placement results + if (aPartRes == aPartRes->original()) + return aPartRes; } } return ResultPartPtr(); -- 2.39.2