From 2894287afadf0661de76dedca44dc4850ed7e50f Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 14 Nov 2005 13:53:08 +0000 Subject: [PATCH] PAL10479 --- src/LightApp/LightApp_ShowHideOp.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; } -- 2.39.2