]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
[MEDCalc] Bug fix on ParaVis dump.
authorabn <adrien.bruneton@cea.fr>
Fri, 5 Aug 2016 14:01:57 +0000 (16:01 +0200)
committerabn <adrien.bruneton@cea.fr>
Fri, 5 Aug 2016 14:01:57 +0000 (16:01 +0200)
src/MEDCalc/cmp/MEDPresentationManager_i.cxx
src/MEDCalc/cmp/MEDPresentationManager_i.hxx
src/MEDCalc/gui/MED_images.ts
src/MEDCalc/gui/MED_msg_en.ts
src/MEDCalc/gui/PresentationController.cxx
src/MEDCalc/res/delete.png [new file with mode: 0644]

index 9fd1a1e6ac0fa1857c81dac465cb54828a56686b..63ffed2af6aa972488d95ffa52c172946317043d 100644 (file)
@@ -324,12 +324,12 @@ MEDPresentationManager_i::getActiveViewPythonId()
 //  }
 //}
 
-char*
+char *
 MEDPresentationManager_i::getParavisDump(MEDPresentation::TypeID presentationID)
 {
   MEDPresentation* pres = _getPresentation(presentationID);
   if (pres) {
-    return (char*) pres->paravisDump().c_str();
+    return CORBA::string_dup(pres->paravisDump().c_str());
   }
   else
     throw KERNEL::createSalomeException("getParavisDump(): presentation not found!!");
index e984b56edac713c78f123b277cd0d1e02d7baa9d..cd2549494524840b067c8939b3b58e8b060a88de 100644 (file)
@@ -73,7 +73,7 @@ class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
   MEDCALC_EXPORT CORBA::Boolean activateView(MEDPresentation::TypeID);
   MEDCALC_EXPORT CORBA::Long getActiveViewPythonId();
 //  MEDCALC_EXPORT MEDCALC::ViewModeType getPresentationViewMode(MEDPresentation::TypeID);
-  MEDCALC_EXPORT char* getParavisDump(MEDPresentation::TypeID presentationID);
+  MEDCALC_EXPORT char * getParavisDump(MEDPresentation::TypeID presentationID);
   MEDCALC_EXPORT MEDCALC::PresentationsList* getAllPresentations();
 
  private:
index 5bc3ee90be13982df43c97f1aa7256b923a01c62..bc019e4996e72ea3dc688b1d19199d40f1c4e42e 100644 (file)
       <source>ICO_WORKSPACE_SAVE</source>
       <translation>workspace_save.png</translation>
     </message>
+    <message>
+      <source>ICO_ICO_DELETE_PRESENTATION</source>
+      <translation>delete.png</translation>
+    </message>
     <!-- Presentation toolbar icons (default theme)-->
     <message>
       <source>ICO_PRESENTATION_MESH_VIEW_DEFAULT</source>
index a9a9a1ebca845460c28b15369f5303c0bffea73e..8e55b5ecbf4dfd99307befcea570a2a76b063a59 100644 (file)
     <message>
       <source>TIP_DELETE_PRESENTATION</source>
       <translation>Delete selected presentation</translation>
+    </message>
+    <message>
+      <source>LAB_PARAVIS_DUMP</source>
+      <translation>Dump pipeline</translation>
+    </message>
+    <message>
+      <source>TIP_PARAVIS_DUMP</source>
+      <translation>Dump the low level Python commands of the presentation</translation>
     </message> 
     <message>
       <source>MENU_PRESENTATIONS</source>
index 09426d90f07524c7b1072fa09f3dceb79c5c67a5..d3dcce702b0580fe4bd3baf3b4fd6afb3c381a13 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
   }
diff --git a/src/MEDCalc/res/delete.png b/src/MEDCalc/res/delete.png
new file mode 100644 (file)
index 0000000..93d1663
Binary files /dev/null and b/src/MEDCalc/res/delete.png differ