From d3bcb0bf618523bdcbff01470fa09c447163c17e Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 4 Sep 2015 08:29:26 +0300 Subject: [PATCH] Fix for other than bodies results renaming and issue #908 --- src/FeaturesPlugin/Test/TestExtrusion.py | 4 ++-- src/Model/Model_Objects.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FeaturesPlugin/Test/TestExtrusion.py b/src/FeaturesPlugin/Test/TestExtrusion.py index cd204d7ed..b6122f30a 100644 --- a/src/FeaturesPlugin/Test/TestExtrusion.py +++ b/src/FeaturesPlugin/Test/TestExtrusion.py @@ -228,9 +228,9 @@ anExtrusionFt.selectionList("base").append( anExtrusionFt.string("CreationMethod").setValue("ByPlanesAndOffsets") anExtrusionFt.real("to_size").setValue(0) #TODO: remove anExtrusionFt.real("from_size").setValue(0) #TODO: remove -anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3/LateralFace_2") +anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/LateralFace_2") anExtrusionFt.real("to_offset").setValue(0) -anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3/LateralFace_1") +anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/LateralFace_1") anExtrusionFt.real("from_offset").setValue(0) anExtrusionFt.execute() aSession.finishOperation() diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 489ed63d1..adb4363a8 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -779,7 +779,7 @@ void Model_Objects::storeResult(std::shared_ptr theFeatureData, std::stringstream aNewName; aNewName<name(); // if there are several results (issue #899: any number of result), add unique prefix starting from second - if (theResultIndex >= 0) + if (theResultIndex > 0 || theResult->groupName() == ModelAPI_ResultBody::group()) aNewName<<"_"<data()->setName(aNewName.str()); } -- 2.39.2