From: asl Date: Mon, 14 Nov 2005 13:53:08 +0000 (+0000) Subject: PAL10479 X-Git-Tag: V3_1_0a3~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2894287afadf0661de76dedca44dc4850ed7e50f;p=modules%2Fgui.git PAL10479 --- diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 3b51a7e86..9f2f37c2f 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -31,12 +31,14 @@ LightApp_Displayer* LightApp_ShowHideOp::displayer( const QString& mod_name ) co { m = dynamic_cast( app->loadModule( mod_name ) ); if( m ) - { app->addModule( m ); - m->connectToStudy( dynamic_cast( app->activeStudy() ) ); - m->setMenuShown( false ); - m->setToolShown( false ); - } + } + + if( m ) + { + m->connectToStudy( dynamic_cast( app->activeStudy() ) ); + m->setMenuShown( false ); + m->setToolShown( false ); } return m ? m->displayer() : 0; }