From 21d28527fe6ce4679098ef597e2b9a81d7f00c74 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 28 Sep 2007 05:47:51 +0000 Subject: [PATCH] Fix for EDF 553 VISU : In Animation Bad range by default in Scalarmap (case for ScalarMapOnDeformedShape presentation type) --- src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc | 79 +++++++++++-------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc index cdba1fcd..5f90db0e 100644 --- a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc +++ b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc @@ -218,11 +218,17 @@ void VISU::ScalarMapOnDeformedShape_i::SetTitle(const char* theTitle) } } -void VISU::ScalarMapOnDeformedShape_i::SetScale(CORBA::Double theScale) { +void +VISU::ScalarMapOnDeformedShape_i +::SetScale(CORBA::Double theScale) +{ myScalarMapOnDeformedShapePL->SetScale(theScale); } -CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetScale(){ +CORBA::Double +VISU::ScalarMapOnDeformedShape_i +::GetScale() +{ return myScalarMapOnDeformedShapePL->GetScale(); } @@ -230,40 +236,39 @@ void VISU::ScalarMapOnDeformedShape_i ::SetRange(CORBA::Double theMin, CORBA::Double theMax) { - if(theMin > theMax) - return; - vtkFloatingPointType aScalarRange[2] = {theMin, theMax}; - myScalarMapOnDeformedShapePL->SetScalarRange(aScalarRange); - myIsFixedRange = true; + TSuperClass::SetRange(theMin, theMax); } -void VISU::ScalarMapOnDeformedShape_i::SetSourceRange(CORBA::Double theMinRange,CORBA::Double theMaxRange){ - SetRange(theMinRange,theMaxRange); +void +VISU::ScalarMapOnDeformedShape_i +::SetSourceRange(CORBA::Double theMin, CORBA::Double theMax) +{ + SetRange(theMin, theMax); } void VISU::ScalarMapOnDeformedShape_i ::SetSourceRange() { - myScalarMapOnDeformedShapePL->SetSourceRange(); - myIsFixedRange = false; + TSuperClass::SetSourceRange(); } -CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMin(){ - vtkFloatingPointType aRange[2]; - myScalarMapOnDeformedShapePL->GetSourceRange(aRange); - return aRange[0]; +CORBA::Double +VISU::ScalarMapOnDeformedShape_i +::GetSourceRangeMin() +{ + return TSuperClass::GetSourceMin(); } -CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMax(){ - vtkFloatingPointType aRange[2]; - myScalarMapOnDeformedShapePL->GetSourceRange(aRange); - return aRange[1]; +CORBA::Double +VISU::ScalarMapOnDeformedShape_i +::GetSourceRangeMax() +{ + return TSuperClass::GetSourceMax(); } void VISU::ScalarMapOnDeformedShape_i::DoHook() { - if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::DoHook:"<<__LINE__<integerValue("VISU", "scalar_def_represent", 2); @@ -298,8 +304,10 @@ VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_In } -void VISU::ScalarMapOnDeformedShape_i::UpdateActor(VISU_Actor* theActor) { - if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::UpdateActor:"<<__LINE__<(theActor)){ if(IsColored()){ anActor->SetBarVisibility(true); @@ -313,14 +321,13 @@ void VISU::ScalarMapOnDeformedShape_i::UpdateActor(VISU_Actor* theActor) { } } -void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName, - const char* theFieldName, - int theIteration, - VISU::TEntity theEntity) +void +VISU::ScalarMapOnDeformedShape_i +::SetScalarField(const char* theMeshName, + const char* theFieldName, + int theIteration, + VISU::TEntity theEntity) { - if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::SetScalarField:"<<__LINE__<