]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix bug 16003: IOLS. Wrong items are in 'Scalar Mode' listbox during ScalarMap_On_Def...
authorjfa <jfa@opencascade.com>
Tue, 22 May 2007 08:00:06 +0000 (08:00 +0000)
committerjfa <jfa@opencascade.com>
Tue, 22 May 2007 08:00:06 +0000 (08:00 +0000)
src/VISUGUI/VisuGUI_Prs3dDlg.cxx
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh

index cd7216680de53462f13076f559962a08cc9d0158..892c3051171a033a1b2797e524f52796ec98ebd6 100644 (file)
@@ -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("<Modulus>");
-  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 == "")
index 3bbed30d679d2256d25c6228f47a8aa164514545..3a94dd9d5b01262fe015cac2d9f9151bbde783a3 100644 (file)
@@ -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<<theTitle<<" "<<VISU_Convertor::GenerateName(aTime)<<std::ends;
index 4120deb0e72d3c8d6371fd8aec2d425783355834..6d242070100a94d60c8d44dc66836d6fed7cd09d 100644 (file)
@@ -103,8 +103,12 @@ namespace VISU
     GetTimeStampIndexByNumber( CORBA::Long theNumber );
 
     virtual 
-    VISU::PValForTime
-    GetScalarValForTime() const;
+    const VISU::PField&
+    GetScalarField() const;
+
+    virtual
+    CORBA::Long
+    GetScalarTimeStampNumber() const;
 
     virtual
     VISU::ColoredPrs3d::TimeStampsRange*
index 3428d68a6c5c28945893a49e745f44d31d799141..f250186855ba99525109427a9f80efb734c557e9 100644 (file)
@@ -451,17 +451,21 @@ VISU::ScalarMapOnDeformedShape_i
 }
 
 
-//----------------------------------------------------------------------------
-VISU::PValForTime
+//---------------------------------------------------------------
+const VISU::PField&
 VISU::ScalarMapOnDeformedShape_i
-::GetScalarValForTime() const 
-{ 
-  VISU::TValField& aValField = myScalarField->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;
 }
 
 
index 3c265777916d71101265b3353723f32c8a4af361..2738ccdc586290b523c6587a8e9c77d4427e2400 100644 (file)
@@ -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;