From 61b1aebd9c102d61dfa2b7e43ba9a379118bc63c Mon Sep 17 00:00:00 2001 From: SONOLET Aymeric Date: Tue, 21 Nov 2023 16:33:15 +0100 Subject: [PATCH] feat: auto publish from shaper to shaperresult on action commited fix SHAPERGUI: Do not auto-publish sketches to shaperstudy --- src/SHAPERGUI/SHAPERGUI.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index b18573838..bd9716b8b 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -534,6 +535,10 @@ static void onOperationGeneric( ModuleBase_Operation* theOperation, void SHAPERGUI::onOperationCommitted(ModuleBase_Operation* theOperation) { onOperationGeneric(theOperation, moduleName(), "committed"); + if ((theOperation->getDescription()->operationId() != "PublishToStudy") + && (! theOperation->getDescription()->operationId().startsWith("Sketch"))) { + publishToStudy(); + } } //****************************************************** @@ -1399,7 +1404,7 @@ void SHAPERGUI::publishToStudy() // update SHAPERSTUDY objects in OCC and VTK viewers QStringList aVMList; - aVMList << "OCCViewer" << "VTKViewer"; + aVMList << "OCCViewer" << "VTKViewer" << "PV3DViewer"; getApp()->updatePresentations("SHAPERSTUDY", aVMList); } } -- 2.39.2