From 344ccabc003d5ad6eb9e315247419454e76cac3d Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 8 Dec 2005 09:17:14 +0000 Subject: [PATCH] PAL10460 - "Erase all" in popup doesn't work in case when selection is empty --- src/LightApp/LightApp_ShowHideOp.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 4cf18982d..52f16266f 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -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 ) { -- 2.39.2