INT PAL 0052273: Geometry object can be deleted only in active view

This commit is contained in:
mpa 2014-01-17 07:12:34 +00:00
parent 736b63e4a9
commit c19429532e
3 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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);

View File

@ -1011,7 +1011,7 @@ void GEOMToolsGUI::removeObjectWithChildren(_PTR(SObject) obj,
QListIterator<SALOME_View*> 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