From: apo Date: Wed, 2 May 2007 13:09:11 +0000 (+0000) Subject: In context of [Bug NPAL15278] EDF 347 : ScalarMaponDeformedShape X-Git-Tag: T_PAL_15278~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3fb33a4119d89f95dc67bbc9e256e6d218c2bb16;p=modules%2Fvisu.git In context of [Bug NPAL15278] EDF 347 : ScalarMaponDeformedShape Automatic scalar bar title regeneration on modification of scalar field or its timestamp --- 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();