From 80fb0312031478656ec40d47ff062f1c36c8cc5d Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 7 Oct 2009 12:04:54 +0000 Subject: [PATCH] Bug IPAL21305 - scalar bar does not correspond to min/max of ScalarMap built on group --- src/PIPELINE/VISU_GaussPointsPL.cxx | 3 +++ src/VISU_I/VISU_GaussPoints_i.cc | 3 +++ src/VISU_I/VISU_ScalarMap_i.cc | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index bad800c6..12a1cf6b 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -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(); diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 675982f3..ac8886f3 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -739,6 +739,9 @@ VISU::GaussPoints_i if(aNbGroups == 0) UpdateIcon(); */ + // To update scalar range according to the new input (IPAL21305) + if(!IsRangeFixed()) + SetSourceRange(); } } } diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index 92a3e43c..974cc641 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -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(); } } } -- 2.39.2