From: jfa Date: Mon, 23 Jan 2006 09:18:05 +0000 (+0000) Subject: PAL11188: PAL_NO_ERROR on Explode, if the main shape is not displayed, but some of... X-Git-Tag: T2_2_9pre~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1772501801cd3ccab2fe1b69c3da22f55361898;p=modules%2Fgeom.git PAL11188: PAL_NO_ERROR on Explode, if the main shape is not displayed, but some of its sub-shapes are. --- diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 69196f3aa..785684eb1 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -98,7 +98,8 @@ GEOMBase_Helper::~GEOMBase_Helper() globalSelection( GEOM_ALLOBJECTS, true ); - delete myDisplayer; + if (myDisplayer) + delete myDisplayer; } //================================================================ @@ -382,7 +383,7 @@ void GEOMBase_Helper::activate( const int theType ) } } - myDisplayer->LocalSelection( aList, 0 ); + getDisplayer()->LocalSelection( aList, 0 ); } //================================================================ @@ -406,7 +407,7 @@ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMo aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ) ) ) ); } - myDisplayer->LocalSelection( aListOfIO, theMode ); + getDisplayer()->LocalSelection( aListOfIO, theMode ); } //================================================================ @@ -418,7 +419,7 @@ void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode { // If object is null local selection for all objects is activated if ( obj->_is_nil() ) { - myDisplayer->LocalSelection( Handle(SALOME_InteractiveObject)(), mode ); + getDisplayer()->LocalSelection( Handle(SALOME_InteractiveObject)(), mode ); return; } @@ -435,7 +436,7 @@ void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode //================================================================ void GEOMBase_Helper::globalSelection( const int theMode, const bool update ) { - myDisplayer->GlobalSelection( theMode, update ); + getDisplayer()->GlobalSelection( theMode, update ); } //================================================================ @@ -446,7 +447,7 @@ void GEOMBase_Helper::globalSelection( const int theMode, const bool update ) void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, const bool update ) { - myDisplayer->GlobalSelection( theModes, update ); + getDisplayer()->GlobalSelection( theModes, update ); } //================================================================ diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index f518e4ecb..457d3ef26 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -840,6 +840,8 @@ void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& the QAD_ViewFrame* vf = GetActiveView(); if ( vf ) { + if (!theIO.IsNull() && !vf->isVisible(theIO)) + Display(theIO); SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() ); ((SALOME_View*)vf)->LocalSelection( prs, theMode ); delete prs; // delete presentation because displayer is its owner