Salome HOME
Bug IPAL21305 - scalar bar does not correspond to min/max of ScalarMap built on group V5_1_main_20091008 V5_1_main_20091009
authorouv <ouv@opencascade.com>
Wed, 7 Oct 2009 12:04:54 +0000 (12:04 +0000)
committerouv <ouv@opencascade.com>
Wed, 7 Oct 2009 12:04:54 +0000 (12:04 +0000)
src/PIPELINE/VISU_GaussPointsPL.cxx
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_ScalarMap_i.cc

index bad800c68913a72d8dfa99105dd67981aff0f5b7..12a1cf6b9c504e203b76daeac9c0d8e925e864cd 100644 (file)
@@ -847,6 +847,9 @@ int
 VISU_GaussPointsPL
 ::AddGeometry(vtkDataSet* theGeometry, const VISU::TName& theGeomName)
 {
+  // Fix for issue 0020167 (like in VISU_ScalarMapPL)
+  if(!IsExternalGeometryUsed())
+    ClearGeometry();
   AddGeometryName(theGeomName);
   myAppendFilter->AddInput(theGeometry);
   return GetNumberOfGeometry();
index 675982f381125b6c6910a4492a5edd5466cffc1e..ac8886f350d588e70802a5e8163d7b9b4e41fc21 100644 (file)
@@ -739,6 +739,9 @@ VISU::GaussPoints_i
       if(aNbGroups == 0)
        UpdateIcon();
       */
+      // To update scalar range according to the new input (IPAL21305)
+      if(!IsRangeFixed())
+        SetSourceRange();
     }
   }
 }
index 92a3e43c080c3b05e2f2f9efa0a2e14408deac1f..974cc64158d0d1c2308337bb269f73300b4408b9 100644 (file)
@@ -404,7 +404,10 @@ VISU::ScalarMap_i
       GetSpecificPL()->AddGeometry(anIDMapper->GetOutput(), theGroupName);
       myGroupNames.insert(theGroupName);
       if(aNbGroups == 0)
-       UpdateIcon();
+        UpdateIcon();
+      // To update scalar range according to the new input (IPAL21305)
+      if(!IsRangeFixed())
+        SetSourceRange();
     }
   }
 }