::SameAsParams(const ColoredPrs3d_i* theOrigin,
const std::string& theMeshName, const std::string& theFieldName,
VISU::Entity theEntity, int theIteration,
- char* theTitle, bool theIsFixedRange)
+ bool theIsFixedRange)
{
myMeshName = theMeshName;
myFieldName = theFieldName;
myEntity = (VISU::TEntity)theEntity;
myIteration = theIteration;
+ int aScalarMode = (const_cast<ColoredPrs3d_i*>(theOrigin))->GetScalarMode();
SameAs(theOrigin);
- myTitle = theTitle;
myIsFixedRange = theIsFixedRange;
Build(-1);
+
+ SetScalarMode(aScalarMode); // mkr : IPAL14030
+
Update();
}
void
VISU::ColoredPrs3d_i
-::SetTitle(const char* theName)
-{
- myTitle = theName;
+::SetTitle(const char* theTitle)
+{
+ // mkr : IPAL14030
+ std::strstream aStream;
+ const VISU::TValField& aValField = myField->myValField;
+ const VISU::PValForTime aValForTime = aValField.find(myIteration)->second;
+ aStream<<theTitle<<" "<<VISU_Convertor::GenerateName(aValForTime->myTime)<<std::ends;
+ std::string aScalarBarTitle = aStream.str();
+ if(myTitle != theTitle || myScalarBarTitle != aScalarBarTitle){
+ myScalarBarTitle = aScalarBarTitle;
+ myTitle = theTitle;
+ }
}
char*
myLabelColor[2] = theB;
}
+//----------------------------------------------------------------------------
+std::string
+VISU::ColoredPrs3d_i
+::GetScalarBarTitle()
+{
+ return myScalarBarTitle;
+}
//----------------------------------------------------------------------------
/**
const VISU::TValField& aValField = myField->myValField;
const VISU::PValForTime aValForTime = aValField.find(myIteration)->second;
aComment.sprintf("%s %s",myFieldName.c_str(),VISU_Convertor::GenerateName(aValForTime->myTime).c_str());
- if (theRestoring == 0) myTitle = aComment.simplifyWhiteSpace().latin1();
+ if (theRestoring == 0) SetTitle(myFieldName.c_str());
}
if(myAddToStudy){
myName = GenerateName().latin1();
virtual
void
- SetTitle(const char* theName);
+ SetTitle(const char* theTitle);
virtual
char*
protected:
VISU::ScalarMap::Orientation myOrientation;
std::string myTitle;
+ std::string myScalarBarTitle;
int myNumberOfLabels;
vtkFloatingPointType myPosition[2], myWidth, myHeight;
SameAsParams(const ColoredPrs3d_i* theOrigin,
const std::string& theMeshName, const std::string& theFieldName,
VISU::Entity theEntity, int theIteration,
- char* theTitle, bool theIsFixedRange);
+ bool theIsFixedRange);
virtual const VISU::PField&
GetField() const;
vtkFloatingPointType theG,
vtkFloatingPointType theB);
+ std::string
+ GetScalarBarTitle();
+
//----------------------------------------------------------------------------
protected:
PField myField;
::UpdateScalarBar(vtkScalarBarActor *theScalarBar,
vtkLookupTable* theLookupTable)
{
- theScalarBar->SetTitle(myTitle.c_str());
+ theScalarBar->SetTitle(GetScalarBarTitle().c_str());
theScalarBar->SetOrientation(myOrientation);
theScalarBar->SetNumberOfLabels(myNumberOfLabels);
if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
VISU_ScalarBarActor *aScalarBar = anActor->GetScalarBar();
aScalarBar->SetLookupTable(myScalarMapPL->GetBarTable());
- aScalarBar->SetTitle(myTitle.c_str());
+ aScalarBar->SetTitle(GetScalarBarTitle().c_str()); // mkr : IPAL14030
aScalarBar->SetOrientation(myOrientation);
aScalarBar->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
aScalarBar->GetPositionCoordinate()->SetValue(myPosition[0],myPosition[1]);
aData.myPrs[i]->SameAsParams(aData.myPrs[0],
aData.myPrs[i]->GetMeshName(),aData.myPrs[i]->GetFieldName(),
aData.myPrs[i]->GetEntity(), aData.myPrs[i]->GetIteration(),
- aData.myPrs[i]->GetTitle(), anIsFixedRange);//jfa 03.08.2005
+ anIsFixedRange);//jfa 03.08.2005
}
}
string aStr = aAnimSObject->GetID();
}
aData.myPrs[i]->SameAsParams(aPrs_i,
aData.myPrs[i]->GetMeshName(),aData.myPrs[i]->GetFieldName(),
- aData.myPrs[i]->GetEntity(), aData.myPrs[i]->GetIteration(),
- aData.myPrs[i]->GetTitle(), anIsFixedRange);
+ aData.myPrs[i]->GetEntity(), aData.myPrs[i]->GetIteration(),
+ anIsFixedRange);
}
}
else if ( myAnimationMode == 1 ) { // successive animation mode
aData.myPrs[i]->SameAsParams(aPrs_i,
aData.myPrs[i]->GetMeshName(),aData.myPrs[i]->GetFieldName(),
aData.myPrs[i]->GetEntity(), aData.myPrs[i]->GetIteration(),
- aData.myPrs[i]->GetTitle(), true);
+ true);
}
}
}