Salome HOME
Merge 'abn/V8_1_fix' branch into V8_1_BR.
[modules/med.git] / src / MEDCalc / cmp / MEDPresentationContour.cxx
index ee4628505aef623b148b0ff522c007eebc8cff3b..5a25cef588e767135542626893aba67c3184e48d 100644 (file)
@@ -36,6 +36,13 @@ MEDPresentationContour::MEDPresentationContour(const MEDCALC::ContourParameters&
   setIntProperty(MEDPresentationContour::PROP_NB_CONTOUR, params.nbContours);
 }
 
+void
+MEDPresentationContour::initFieldMeshInfos()
+{
+  MEDPresentation::initFieldMeshInfos();
+  _colorByType = "POINTS";
+}
+
 void
 MEDPresentationContour::setNumberContours()
 {
@@ -73,7 +80,7 @@ MEDPresentationContour::internalGeneratePipeline()
       throw KERNEL::createSalomeException(mes);
     }
 
-  setOrCreateRenderView(); // instanciate __viewXXX
+  setOrCreateRenderView(); // instanciate __viewXXX, needs to be after the exception above otherwise previous elements in the view will be hidden.
 
   // Contour needs point data:
   applyCellToPointIfNeeded();
@@ -90,7 +97,7 @@ MEDPresentationContour::internalGeneratePipeline()
   // Set number of contours
   setNumberContours();
 
-  colorBy("POINTS");    // necessarily POINTS because of the conversion above
+  colorBy();    // see initFieldInfo() - necessarily POINTS because of the conversion above
   showScalarBar();
   selectColorMap();
   rescaleTransferFunction();