Salome HOME
[MEDCalc] : better slices + more error handling when invalid params
[modules/med.git] / src / MEDCalc / gui / PresentationController.cxx
index 09426d90f07524c7b1072fa09f3dceb79c5c67a5..3b8e9e21948bf30037e5f25ae397e76f5138f393 100644 (file)
@@ -242,21 +242,21 @@ PresentationController::createActions()
 
   label   = tr("LAB_DELETE_PRESENTATION");
   tooltip = tr("TIP_DELETE_PRESENTATION");
-  icon    = tr(_getIconName("ICO_DELETE_PRESENTATION").c_str());
+  icon    = tr("ICO_DELETE_PRESENTATION");
   actionId = _salomeModule->createStandardAction(label,this, SLOT(onDeletePresentation()),icon,tooltip);
   //  _salomeModule->createTool(actionId, presentationToolbarId);
   //  _salomeModule->action(actionId)->setIconVisibleInMenu(true);
   _salomeModule->createMenu(actionId, presentationMenuId);
 
-  //
-  // Actions for popup menu only
-  //
   // Low level PARAVIS dump
   label = tr("LAB_PARAVIS_DUMP");
-  //icon  = tr("ICO_DATASOURCE_EXPAND_FIELD");
+  tooltip = tr("TIP_PARAVIS_DUMP");
   actionId = _salomeModule->createStandardAction(label,this,SLOT(onParavisDump()),"");
-  _salomeModule->addActionInPopupMenu(actionId);
+  _salomeModule->createMenu(actionId, presentationMenuId);
 
+  //
+  // Actions for popup menu only
+  //
 
 }
 
@@ -648,9 +648,9 @@ PresentationController::onParavisDump()
         continue;
 
       std::string dump(_presManager->getParavisDump(presId));
-      std::cerr << "#====== ParaVis dump =============== " << std::endl;
+      std::cerr << "#====== ParaVis dump (presentation "  << presId << ") =====" << std::endl;
       std::cerr << dump;
-      std::cerr << "#====== End of ParaVis dump ======== " << std::endl;
+      std::cerr << "#====== End of ParaVis dump =============== " << std::endl;
 
       break; // stop at the first one
   }
@@ -755,6 +755,8 @@ PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
   }
   else if ( event->type == MEDCALC::EVENT_REMOVE_PRESENTATION ) {
       updateTreeViewForPresentationRemoval(event->presentationId);
+      // Hide parameter widget if necessary:
+      onPresentationSelected(-1, "", "");
   }
   else if ( event->type == MEDCALC::EVENT_MODIFY_PRESENTATION ) {
       // Update parameter widget if shown: