From: jfa Date: Tue, 22 May 2007 08:00:06 +0000 (+0000) Subject: Fix bug 16003: IOLS. Wrong items are in 'Scalar Mode' listbox during ScalarMap_On_Def... X-Git-Tag: V4_0~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d61d4a74ce4a19a9d482b95371ce85038d289c4c;p=modules%2Fvisu.git Fix bug 16003: IOLS. Wrong items are in 'Scalar Mode' listbox during ScalarMap_On_DeformedShape creation. --- diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index cd721668..892c3051 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -744,13 +744,13 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs) setScalarBarData( myScalarMap->GetNbColors(), myScalarMap->GetLabels() ); // Update myModeCombo - int aNbComp = myScalarMap->GetField()->myNbComp; + const VISU::PField& aField = myScalarMap->GetScalarField(); + const VISU::TNames& aCompNames = aField->myCompNames; + const VISU::TNames& aUnitNames = aField->myUnitNames; + int aNbComp = aField->myNbComp; bool isScalarMode = (aNbComp > 1); myModeCombo->clear(); myModeCombo->insertItem(""); - const VISU::PField& aField = myScalarMap->GetField(); - const VISU::TNames& aCompNames = aField->myCompNames; - const VISU::TNames& aUnitNames = aField->myUnitNames; for(int i = 0; i < aNbComp; i++){ QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace(); if(aComponent.isNull() || aComponent == "") diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 3bbed30d..3a94dd9d 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -315,16 +315,20 @@ VISU::ColoredPrs3d_i //---------------------------------------------------------------------------- -VISU::PValForTime +const VISU::PField& VISU::ColoredPrs3d_i -::GetScalarValForTime() const -{ - VISU::TValField& aValField = GetField()->myValField; - PValForTime aValForTime; - VISU::TValField::iterator anIter = aValField.find(myTimeStampNumber); - if(anIter != aValField.end()) - aValForTime = anIter->second; - return aValForTime; +::GetScalarField() const +{ + return myField; +} + + +//---------------------------------------------------------------------------- +CORBA::Long +VISU::ColoredPrs3d_i +::GetScalarTimeStampNumber() const +{ + return myTimeStampNumber; } @@ -712,7 +716,13 @@ void VISU::ColoredPrs3d_i ::SetTitle(const char* theTitle) { - if(VISU::PValForTime aValForTime = GetScalarValForTime()){ + VISU::PValForTime aValForTime; + VISU::TValField& aValField = GetScalarField()->myValField; + VISU::TValField::iterator anIter = aValField.find(GetScalarTimeStampNumber()); + if (anIter != aValField.end()) + aValForTime = anIter->second; + + if (aValForTime) { std::strstream aStream; const VISU::TTime& aTime = aValForTime->myTime; aStream<myValField; - PValForTime aValForTime; - VISU::TValField::iterator anIter = aValField.find(myScalarTimeStampNumber); - if(anIter != aValField.end()) - aValForTime = anIter->second; - return aValForTime; +::GetScalarField() const +{ + return myScalarField; +} + + +//--------------------------------------------------------------- +CORBA::Long +VISU::ScalarMapOnDeformedShape_i +::GetScalarTimeStampNumber() const +{ + return myScalarTimeStampNumber; } diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh index 3c265777..2738ccdc 100644 --- a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh +++ b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh @@ -185,8 +185,12 @@ namespace VISU GetScalarLIteration(); virtual - VISU::PValForTime - GetScalarValForTime() const; + const VISU::PField& + GetScalarField() const; + + virtual + CORBA::Long + GetScalarTimeStampNumber() const; private: VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;