From 3fb33a4119d89f95dc67bbc9e256e6d218c2bb16 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 2 May 2007 13:09:11 +0000 Subject: [PATCH] In context of [Bug NPAL15278] EDF 347 : ScalarMaponDeformedShape Automatic scalar bar title regeneration on modification of scalar field or its timestamp --- src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc | 50 +++++++++++-------- src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh | 2 + 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc index 898e38f3..0b713f68 100644 --- a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc +++ b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc @@ -108,30 +108,21 @@ VISU::Storable* VISU::ScalarMapOnDeformedShape_i::Create(const char* theMeshName if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::Create:"<<__LINE__<myValField; + const VISU::PValForTime aValForTime = aValField.find(myScalarIteration)->second; + aStream<myTime)<SetScale(theScale); } @@ -323,7 +327,10 @@ char* VISU::ScalarMapOnDeformedShape_i::GetScalarCMeshName(){ } void VISU::ScalarMapOnDeformedShape_i::SetScalarFieldName(const char* theName){ - myScalarFieldName = theName; + if(myScalarFieldName != theName){ + myScalarFieldName = theName; + SetTitle(theName); + } } std::string VISU::ScalarMapOnDeformedShape_i::GetScalarFieldName(){ @@ -335,7 +342,10 @@ char* VISU::ScalarMapOnDeformedShape_i::GetScalarCFieldName(){ } void VISU::ScalarMapOnDeformedShape_i::SetScalarIteration(const int theValue){ - myScalarIteration = theValue; + if(myScalarIteration != theValue){ + myScalarIteration = theValue; + SetTitle(GetScalarFieldName().c_str()); + } } diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh index 01542563..37865e4e 100644 --- a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh +++ b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh @@ -61,6 +61,8 @@ namespace VISU{ typedef VISU::ScalarMapOnDeformedShape TInterface; + virtual void SetTitle(const char* theTitle); + virtual void SetScale(CORBA::Double theScale); virtual CORBA::Double GetScale(); -- 2.39.2