]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
PAL10460 - "Erase all" in popup doesn't work in case when selection is empty
authorasl <asl@opencascade.com>
Thu, 8 Dec 2005 09:17:14 +0000 (09:17 +0000)
committerasl <asl@opencascade.com>
Thu, 8 Dec 2005 09:17:14 +0000 (09:17 +0000)
src/LightApp/LightApp_ShowHideOp.cxx

index 4cf18982dd5d82d638cc020863ba236d5dd02d80..52f16266f424acb5d53427b47487bb864353bd69 100644 (file)
@@ -58,8 +58,16 @@ void LightApp_ShowHideOp::startOperation()
     abort();
     return;
   }
-  QString aStr =  sel.param( 0, "component" ).toString();
-  QString mod_name = app->moduleTitle( aStr );//sel.param( 0, "component" ).toString() );
+
+  QString mod_name;
+  if( sel.count()>0 )
+  {
+    QString aStr =  sel.param( 0, "component" ).toString();
+    mod_name = app->moduleTitle( aStr );
+  }
+  else if( app->activeModule() )
+    mod_name = app->moduleTitle( app->activeModule()->name() );
+
   LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( mod_name, true );
   if( !d )
   {