From 861d3cb11b614ee8865909c854ebb5b82955e2a5 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 3 Feb 2017 16:11:59 +0300 Subject: [PATCH] Deleted Study parameter --- doc/salome/gui/input/using_pluginsmanager.doc | 6 +++--- src/GuiHelpers/SALOME_GuiServices.cxx | 2 +- src/SalomeApp/pluginsdemo/salome_plugins.py | 6 +++--- src/SalomeApp/pluginsdemo/trihedron.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/salome/gui/input/using_pluginsmanager.doc b/doc/salome/gui/input/using_pluginsmanager.doc index bff116f05..71302d2bb 100644 --- a/doc/salome/gui/input/using_pluginsmanager.doc +++ b/doc/salome/gui/input/using_pluginsmanager.doc @@ -100,7 +100,7 @@ training course): import salome import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() # Create the objects Vx = geompy.MakeVectorDXDYDZ(10, 0, 0) @@ -122,10 +122,10 @@ import salome_pluginsmanager def trihedron(context): import GEOM from salome.geom import geomBuilder - geompy = geomBuilder.New(salome.myStudy) + geompy = geomBuilder.New() # Intialize the geompy factory with the active study activeStudy = context.study - geompy.init_geom(activeStudy) + geompy.init_geom() # Create the objects Vx = geompy.MakeVectorDXDYDZ(10, 0, 0) Vy = geompy.MakeVectorDXDYDZ(0, 10, 0) diff --git a/src/GuiHelpers/SALOME_GuiServices.cxx b/src/GuiHelpers/SALOME_GuiServices.cxx index c834860cb..59d77362e 100644 --- a/src/GuiHelpers/SALOME_GuiServices.cxx +++ b/src/GuiHelpers/SALOME_GuiServices.cxx @@ -73,7 +73,7 @@ namespace GUI { * defined in the SALOME session, returns null otherwise. */ SALOMEDS::Study_ptr getStudyServant() { - return KERNEL::getStudyServant(); + return SALOMEDS::Study::_duplicate(KERNEL::getStudyServant()); } // __GBO__ Question: what is the difference between a diff --git a/src/SalomeApp/pluginsdemo/salome_plugins.py b/src/SalomeApp/pluginsdemo/salome_plugins.py index d2b43cb68..f93ba12a7 100755 --- a/src/SalomeApp/pluginsdemo/salome_plugins.py +++ b/src/SalomeApp/pluginsdemo/salome_plugins.py @@ -28,7 +28,7 @@ if DEMO_IS_ACTIVATED: try: import GEOM from salome.geom import geomBuilder - geompy = geomBuilder.New(salome.myStudy) + geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder @@ -48,7 +48,7 @@ if DEMO_IS_ACTIVATED: from salome.geom import geomBuilder # Intialize the geompy factory with the active study - geompy = geomBuilder.New(context.study) + geompy = geomBuilder.New() # Create the objects Vx = geompy.MakeVectorDXDYDZ(10, 0, 0) @@ -75,7 +75,7 @@ if DEMO_IS_ACTIVATED: from salome.geom import geomBuilder # Intialize the geompy factory with the active study - geompy = geomBuilder.New(context.study) + geompy = geomBuilder.New() # Create the objects Vx = geompy.MakeVectorDXDYDZ(10, 0, 0) diff --git a/src/SalomeApp/pluginsdemo/trihedron.py b/src/SalomeApp/pluginsdemo/trihedron.py index 3439d0830..95fd3d001 100644 --- a/src/SalomeApp/pluginsdemo/trihedron.py +++ b/src/SalomeApp/pluginsdemo/trihedron.py @@ -26,7 +26,7 @@ import salome import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() # Create the objects Vx = geompy.MakeVectorDXDYDZ(10, 0, 0) -- 2.39.2