From 5cef64b2db0d5a99a2103e239c729d3f8b242751 Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 7 Oct 2009 12:04:26 +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 0355895a..642a99c1 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -828,6 +828,9 @@ int VISU_GaussPointsPL ::AddGeometry(vtkDataSet* theGeometry) { + // Fix for issue 0020167 (like in VISU_ScalarMapPL) + if(!IsExternalGeometryUsed()) + ClearGeometry(); myAppendFilter->AddInput(theGeometry); return GetNumberOfGeometry(); } diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 22675855..bf7f6b26 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -730,6 +730,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 69decca4..c50e2d74 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -310,7 +310,10 @@ VISU::ScalarMap_i GetSpecificPL()->AddGeometry(anIDMapper->GetOutput()); myGroupNames.insert(theGroupName); if(aNbGroups == 0) - UpdateIcon(); + UpdateIcon(); + // To update scalar range according to the new input (IPAL21305) + if(!IsRangeFixed()) + SetSourceRange(); } } } -- 2.39.2