From e4a8a5578c103fee72b55ad9e29b81e4aab2b0c3 Mon Sep 17 00:00:00 2001 From: Nicolas RECHATIN Date: Tue, 27 Jul 2021 09:53:01 +0200 Subject: [PATCH] feature addVolume working as Result --- src/OperaPlugin/OperaPlugin_Volume.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/OperaPlugin/OperaPlugin_Volume.cpp b/src/OperaPlugin/OperaPlugin_Volume.cpp index e8e4c3a9a..6e11a9172 100644 --- a/src/OperaPlugin/OperaPlugin_Volume.cpp +++ b/src/OperaPlugin/OperaPlugin_Volume.cpp @@ -24,6 +24,8 @@ #include #include #include + +#include #include #include @@ -105,22 +107,22 @@ void OperaPlugin_Volume::execute() do { anInd++; std::wostringstream aNameStr; - aNameStr << "Volume_" << aBaseName << "_" << (aSelIndex + anInd); + aNameStr << "Volume_" << aBaseName; aName = aNameStr.str(); } while (anExistingNames.count(aName)); anExistingNames.insert(aName); - std::shared_ptr aResultVolume = document()->createVolume(data(), aResultIndex); + std::shared_ptr aResultVolume = document()->createBody(data(), aResultIndex); aResultVolume->data()->setName(aName); // to make sub-results also names with a similar name temporarily rename the feature std::wstring anOrigName = name(); data()->setName(aBaseName); - aResultVolume->store(aResult); //TODO : CRASH, works with BODY + aResultVolume->store(aResult); //TODO : CRASH, works with Volume data()->setName(anOrigName); aResultVolume->loadFirstLevel(aResult, "Copy"); - setResult(aResultVolume, aResultIndex++); + setResult(aResultVolume, ++aResultIndex); } removeResults(aResultIndex); } -- 2.39.2