From c19429532ea95e12070ba5d40581108abd87f792 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 17 Jan 2014 07:12:34 +0000 Subject: [PATCH] INT PAL 0052273: Geometry object can be deleted only in active view --- src/GEOMGUI/GEOM_Displayer.cxx | 5 +++-- src/GEOMGUI/GEOM_Displayer.h | 3 ++- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index f4d8cbb98..2683c9603 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -485,13 +485,14 @@ void GEOM_Displayer::Erase( const Handle(SALOME_InteractiveObject)& theIO, //================================================================= void GEOM_Displayer::Erase( GEOM::GEOM_BaseObject_ptr theObj, const bool forced, - const bool updateViewer ) + const bool updateViewer, + SALOME_View* theViewFrame) { std::string entry = getEntry( theObj ); if ( entry != "" ) { Erase(new SALOME_InteractiveObject(entry.c_str(), "GEOM", getName(theObj).c_str()), - forced, updateViewer); + forced, updateViewer, theViewFrame); } } diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h index 4e8df530b..c26eca72a 100644 --- a/src/GEOMGUI/GEOM_Displayer.h +++ b/src/GEOMGUI/GEOM_Displayer.h @@ -105,7 +105,8 @@ public: void Erase ( GEOM::GEOM_BaseObject_ptr theObj, const bool forced = false, - const bool updateViewer = true ); + const bool updateViewer = true, + SALOME_View* theViewFrame = 0); void EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO, const bool eraseOnlyChildren = false); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 8ac38a4bb..a25e0dc75 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -1011,7 +1011,7 @@ void GEOMToolsGUI::removeObjectWithChildren(_PTR(SObject) obj, QListIterator it( views ); while ( it.hasNext() ) if ( SALOME_View* view = it.next() ) - disp->Erase(geomObj, true, view); + disp->Erase(geomObj, true, true, view); // Remove object from Engine // We can't directly remove object from engine. All we can do is to unpublish the object -- 2.39.2