]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
feat: auto publish from shaper to shaperresult on action commited
authorSONOLET Aymeric <aymeric.sonolet@cea.fr>
Tue, 21 Nov 2023 15:33:15 +0000 (16:33 +0100)
committerSONOLET Aymeric <aymeric.sonolet@cea.fr>
Fri, 1 Dec 2023 15:04:03 +0000 (16:04 +0100)
fix SHAPERGUI: Do not auto-publish sketches to shaperstudy

src/SHAPERGUI/SHAPERGUI.cpp

index b1857383834035a7df4e394e69f885e140c867ea..bd9716b8b241925e9b4729ba483757c2e064ee2e 100644 (file)
@@ -36,6 +36,7 @@
 #include <XGUI_ViewerProxy.h>
 
 #include <ModuleBase_Operation.h>
+#include <ModuleBase_OperationDescription.h>
 #include <ModuleBase_Preferences.h>
 #include <ModuleBase_ActionInfo.h>
 #include <ModuleBase_IModule.h>
@@ -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);
   }
 }