Salome HOME
Copyright update 2022
[modules/gui.git] / src / LightApp / LightApp_Module.cxx
index ee0b2e5054fdc602326bba8b919841bf43d62d7f..e5fef3efa9c1d5ac6bffc24d9b73433b0afa263a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -463,9 +463,9 @@ QtxPopupMgr* LightApp_Module::popupMgr()
     myPopupMgr->insert( eraseAll, -1, 0 );
     myPopupMgr->insert( separator(), -1, 0 );
 
-    QString oneAndNotActive = "( count( $component ) = 1 ) and ( not( activeModule in $component ) )";
+    QString oneAndNotActive = "( count( $component ) = 1 ) and ( not( activeModule in $component ) ) and ( not($displayer={'%3'}) )";
     QString uniform = "true in $canBeDisplayed and %1 and ( activeModule = '%2' )";
-    uniform = uniform.arg( oneAndNotActive ).arg( name() );
+    uniform = uniform.arg( oneAndNotActive ).arg( name() ).arg( LightApp_Application::moduleDisplayer( name() ) );
     myPopupMgr->setRule( disp, /*QString( "( not isVisible ) and " ) + */ uniform, QtxPopupMgr::VisibleRule );
     myPopupMgr->setRule( erase, /*QString( "( isVisible ) and " ) + */ uniform, QtxPopupMgr::VisibleRule );
     myPopupMgr->setRule( dispOnly, uniform, QtxPopupMgr::VisibleRule );