diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index 0e75e9aec..ffae0d61d 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -110,14 +110,16 @@ GEOM_Swig::~GEOM_Swig() // MESSAGE("Destructeur"); } -void GEOM_Swig::createAndDisplayGO (const char* Entry) +void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) { class TEvent: public SALOME_Event { std::string myEntry; + bool myUpdateViewer; public: - TEvent(const char* theEntry): - myEntry(theEntry) + TEvent(const char* theEntry, bool toUpdateViewer): + myEntry(theEntry), + myUpdateViewer(toUpdateViewer) {} virtual void Execute() { @@ -178,7 +180,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) "GEOM", const_cast( obj->GetID().c_str())); - GEOM_Displayer(ActiveStudy).Display(anIO, true); + GEOM_Displayer(ActiveStudy).Display(anIO, myUpdateViewer); /*if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) { SVTK_View* aView = aViewWindow->getView(); int aMode = aView->GetDisplayMode(); @@ -216,7 +218,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) }; // MESSAGE("createAndDisplayGO"); - ProcessVoidEvent(new TEvent (Entry)); + ProcessVoidEvent(new TEvent (Entry, isUpdated)); class TEventUpdateBrowser: public SALOME_Event { @@ -233,7 +235,8 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry) } }; - ProcessVoidEvent(new TEventUpdateBrowser ()); + if (isUpdated) + ProcessVoidEvent(new TEventUpdateBrowser ()); } void GEOM_Swig::createAndDisplayFitAllGO (const char* Entry) diff --git a/src/GEOMGUI/GeometryGUI_Swig.hxx b/src/GEOMGUI/GeometryGUI_Swig.hxx index 6a4253372..c69f6ed76 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.hxx +++ b/src/GEOMGUI/GeometryGUI_Swig.hxx @@ -49,7 +49,7 @@ public: GEOM_Swig(); ~GEOM_Swig(); - void createAndDisplayGO(const char* Entry); + void createAndDisplayGO(const char* Entry, bool isUpdated = true); void eraseGO(const char* Entry, bool allWindows); void createAndDisplayFitAllGO(const char* Entry); void setDisplayMode(const char* Entry, int mode); diff --git a/src/GEOMGUI/GeometryGUI_Swig.i b/src/GEOMGUI/GeometryGUI_Swig.i index 07a99e9ac..5fe15a2ee 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.i +++ b/src/GEOMGUI/GeometryGUI_Swig.i @@ -36,7 +36,7 @@ class GEOM_Swig GEOM_Swig(); ~GEOM_Swig(); - void createAndDisplayGO(const char* Entry); + void createAndDisplayGO(const char* Entry, bool isUpdated =true); void eraseGO(const char* Entry, bool allWindows); void createAndDisplayFitAllGO(const char* Entry); int getIndexTopology(const char *SubEntry, const char *Entry);