]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
EDF 2182: Salome crashes when Physical size is set to 0
authorgdd <gdd>
Fri, 23 Mar 2012 10:38:09 +0000 (10:38 +0000)
committergdd <gdd>
Fri, 23 Mar 2012 10:38:09 +0000 (10:38 +0000)
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx

index ca260ab644f0492decd1ce4d2e98535a6569ea40..4cd31dca8c6554cd3e1a7946143d573dcc49e3b5 100644 (file)
@@ -185,7 +185,12 @@ void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPhySize(double theVal) {
   if (theVal != _phySize) {
-    _phySize = theVal;
+    if (theVal == 0) {
+      _phySize = GetPhyMax();
+      MESSAGE("Warning: nul physical size is not allowed");
+    }
+    else
+      _phySize = theVal;
     NotifySubMeshesHypothesisModification();
   }
 }