From: apo Date: Thu, 2 Nov 2006 06:13:02 +0000 (+0000) Subject: To fix a regression X-Git-Tag: WP1_2_3_06-10-2006~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ceda9dfa4303747f7c64850607761f20924610e;p=modules%2Fvisu.git To fix a regression --- diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx index 10ae96f3..27e8b5bf 100644 --- a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx @@ -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 ) {