]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To fix a regression
authorapo <apo@opencascade.com>
Thu, 2 Nov 2006 06:13:02 +0000 (06:13 +0000)
committerapo <apo@opencascade.com>
Thu, 2 Nov 2006 06:13:02 +0000 (06:13 +0000)
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx

index 10ae96f311e1a303ee5de9e71afdc4cca2dba063..27e8b5bf4762e4a47f08e565bbcb5c21ff03d1dd 100644 (file)
@@ -167,6 +167,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
 
   setFactor(myPrs->GetScale());
   myTimeStampsCombo->setDisabled(isAnim);
+  myCurrMeshName = thePrs->GetCMeshName();
 
   QString aFieldName(myPrs->GetScalarFieldName().c_str());
   CORBA::String_var aMeshName = myPrs->GetMeshName();
@@ -245,8 +246,6 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
 
       for (aIter->InitEx(true); aIter->More(); aIter->Next()) {
         _PTR(SObject) aChildSObj = aIter->Value();
-        CORBA::Object_var aChildObject = VISU::ClientSObjectToObject(aChildSObj);
-
         _PTR(GenericAttribute) anAttr;
         if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
           _PTR(AttributeComment) aComment (anAttr);
@@ -261,10 +260,10 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
               _PTR(GenericAttribute) anAttr;
               if (aChildSObj->FindAttribute(anAttr, "AttributeName")) {
                 _PTR(AttributeName) aNameAttr(anAttr);
-                VISU::Prs3d_var aPrsObj = VISU::Prs3d::_narrow(aChildObject);
-                QString aName = VISU::getValue(aChildSObj, "myMeshName");
-               CORBA::String_var aMeshName = aPrsObj->GetMeshName();
-                if (QString(aMeshName.in()) != aName) continue;
+                QString aMeshName = VISU::getValue(aChildSObj, "myMeshName");
+               CORBA::String_var aName = myPrs->GetMeshName();
+                if (aMeshName != aName.in()) 
+                 continue;
                 myCurrMeshName = aMeshName;
                 QString aFieldName = VISU::getValue(aChildSObj, "myFieldName");
                 QString aTimeIter  = VISU::getValue(aChildSObj, "myTimeStampId");
@@ -276,10 +275,10 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
                 case 2: anEntity = VISU::FACE_ENTITY; break;
                 case 3: anEntity = VISU::CELL_ENTITY; break;
                 }
-                TFT &aFieldsMap = myMeshFieldsTimes[aMeshName.in()];
+                TFT &aFieldsMap = myMeshFieldsTimes[aMeshName.latin1()];
                 TFE aKey (aFieldName.latin1(), anEntity);
                 aFieldsMap[aKey][aTimeIter.toInt()] = 
-                  GetFloatValueOfTimeStamp(aMeshName.in(),
+                  GetFloatValueOfTimeStamp(aMeshName.latin1(),
                                            aFieldName.latin1(),
                                            aTimeIter.toInt(),
                                            anEntity);
@@ -306,15 +305,15 @@ int VisuGUI_ScalarMapOnDeformedShapeDlg::storeToPrsObject
   thePrs->SetScale(getFactor());
 
   if (myIsAnimation)
-    thePrs->SetScalarField(myPrs->GetScalarMeshName().c_str(),
-                          getCurrentScalarFieldName().latin1(),
-                          theIter,
-                          myPrs->GetScalarEntity());
+    thePrs->SetCScalarField(myPrs->GetScalarMeshName().c_str(),
+                           getCurrentScalarFieldName().latin1(),
+                           theIter,
+                           myPrs->GetScalarEntity());
   else
-    thePrs->SetScalarField(myPrs->GetScalarMeshName().c_str(),
-                          getCurrentScalarFieldName().latin1(),
-                          myTimeStampsCombo->currentItem() + 1,
-                          myPrs->GetScalarEntity());
+    thePrs->SetCScalarField(myPrs->GetScalarMeshName().c_str(),
+                           getCurrentScalarFieldName().latin1(),
+                           myTimeStampsCombo->currentItem() + 1,
+                           myPrs->GetScalarEntity());
 
   if (theUpdateScalars) SetScalarField( false );
 
@@ -366,10 +365,10 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString the
 
   VISU::TEntity anEntity = getCurrentScalarEntity();
 
-  myPrs->SetScalarField(myCurrMeshName.latin1(),
-                       aFieldName.latin1(),
-                       theIter,
-                       anEntity);
+  myPrs->SetCScalarField(myCurrMeshName.latin1(),
+                        aFieldName.latin1(),
+                        theIter,
+                        anEntity);
 
   if( save_scalar_pane )
   {