]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
[MEDCalc] Support for ELNO field + minor GUI bug fix.
authorabn <adrien.bruneton@cea.fr>
Mon, 8 Aug 2016 14:21:26 +0000 (16:21 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 8 Aug 2016 14:21:26 +0000 (16:21 +0200)
src/MEDCalc/cmp/MEDPresentation.cxx
src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx

index e76ad76935ddf784b4250e34fe39073d49a4e4b1..a0beac5428599fdebb551654272d874e15e159e5 100644 (file)
@@ -240,6 +240,8 @@ MEDPresentation::getPVFieldTypeString(MEDCoupling::TypeOfField fieldType) const
       return "POINTS";
     case MEDCoupling::ON_GAUSS_PT:
       return "POINTS"; // because internally after application of the ELGA filter, the field will appear as a POINT field
+    case MEDCoupling::ON_GAUSS_NE:
+      return "POINTS"; // because internally after application of the ELNO mesh filter, the field will appear as a POINT field
     default:
       STDLOG("MEDPresentation::getPVFieldTypeString() -- Not implemented ! ELNO field?");
       return "";
@@ -265,6 +267,7 @@ MEDPresentation::createSource()
     case MEDCoupling::ON_CELLS: typ = "P0"; break;
     case MEDCoupling::ON_NODES: typ = "P1"; break;
     case MEDCoupling::ON_GAUSS_PT: typ = "GAUSS"; break;
+    case MEDCoupling::ON_GAUSS_NE: typ = "GSSNE"; break;
     default:
       const char * msg ="MEDPresentation::createSource(): field type not impl. yet!";
       STDLOG(msg);
@@ -294,18 +297,12 @@ MEDPresentation::createSource()
     }
   if(_mcFieldType == MEDCoupling::ON_GAUSS_NE)
     {
-      const char * msg ="MEDPresentation::createSource(): ELNO field never tested!";
-      STDLOG(msg);
-      throw KERNEL::createSalomeException(msg);
-
       std::ostringstream oss, oss2;
       oss2 << "__srcObj" << GeneratePythonId();
       oss << oss2.str() << " = pvs.ELNOMesh(Input=" << _srcObjVar << ");";
       pushAndExecPyLine(oss.str()); oss.str("");
       // Now the source becomes the result of the CellDatatoPointData:
       _srcObjVar = oss2.str();
-//      oss << _srcObjVar << ".SelectSourceArray = ['CELLS', 'ELNO@0'];";
-//      pushAndExecPyLine(oss.str()); oss.str("");
     }
 }
 
index 601e46d44f34aca07898c17983524b7f9354ab89..3114be35edb16faa3d31144fd636863d37d37c68 100644 (file)
@@ -90,10 +90,9 @@ WidgetPresentationParameters::toggleCommonFieldWidget(bool show)
 void
 WidgetPresentationParameters::toggleWidget(bool show)
 {
+  toggleCommonFieldWidget(true);
   if (!show)
     {
-      toggleCommonFieldWidget(true);
-
       _blockSig = true;
       _ui.widgetDynamic->hide();
       setPresName(tr("LAB_DEFAULT_DYN_TITLE").toStdString());