From 4b617d3f22cc8851b0188e6a6f7c42df3dcaf69c Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 30 May 2016 11:06:35 +0300 Subject: [PATCH] Fix for the issue #1504 : parameter in Part may refer to any parameter in PartSet --- src/ModelAPI/ModelAPI_Tools.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index 1270db2ec..922bad719 100755 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -159,14 +159,9 @@ bool findVariable(FeaturePtr theSearcher, const std::string& theName, double& ou return true; DocumentPtr aRootDocument = aSession->moduleDocument(); if (aDocument != aRootDocument) { - ResultPtr aPartResult = findPartResult(aRootDocument, aDocument); - if (aPartResult.get()) { - FeaturePtr aPartFeature; - if (theSearcher.get()) // only if the relative search is needed - aPartFeature = aRootDocument->feature(aPartResult); - if (findVariable(aRootDocument, aPartFeature, theName, outValue, theParam)) - return true; - } + // any parameters in PartSet is okindependently on the Part position (issu #1504) + if (findVariable(aRootDocument, FeaturePtr(), theName, outValue, theParam)) + return true; } return false; } -- 2.39.2