Handle(SALOME_InteractiveObject) aIO = selected.First();
if (aIO->hasEntry()) {
_PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
- aSObject = aSObject->GetFather();
- aSObject = aSObject->GetFather();
- aSObject = aSObject->GetFather();
- aSObject = aSObject->GetFather();
+ _PTR(GenericAttribute) anTmpAttr;
+ if(aSObject->FindAttribute(anTmpAttr, "AttributeComment")){
+ _PTR(AttributeComment) aTmpComment (anTmpAttr);
+ string aTmpComm = aTmpComment->Value();
+ QString aTmpstrIn (aTmpComm.c_str());
+ VISU::Storable::TRestoringMap aTmpaMap;
+ VISU::Storable::StrToMap(aTmpstrIn,aTmpaMap);
+ bool aTmpisExist;
+ VISU::VISUType aTmpType = (VISU::VISUType)VISU::Storable::FindValue(aTmpaMap,"myType",&aTmpisExist).toInt();
+ switch(aTmpType){
+ case VISU::TTIMESTAMP:
+ {
+ aSObject = aSObject->GetFather();
+ aSObject = aSObject->GetFather();
+ break;
+ }
+ case VISU::TFIELD:
+ {
+ _PTR(SObject) newSObject;
+ if(aSObject->ReferencedObject(newSObject)) aSObject = newSObject;
+ aSObject = aSObject->GetFather();
+ break;
+ }
+ case VISU::TANIMATION:
+ {
+ _PTR(ChildIterator) aTmpIter = aActiveStudy->NewChildIterator(aSObject);
+ for (aTmpIter->InitEx(true); aTmpIter->More(); aTmpIter->Next()) {
+ _PTR(SObject) aTmpChildSObj = aTmpIter->Value();
+ _PTR(SObject) newSObject;
+ if(aTmpChildSObj->ReferencedObject(newSObject)){
+ aSObject = newSObject;
+ aSObject->GetFather();
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
mySelectionObj = aSObject;
CORBA::Object_var anObject = VISU::ClientSObjectToObject(mySelectionObj);
VISU::Result_var aResult;
VISU::ScalarMapOnDeformedShape_i
::SameAs(const Prs3d_i* theOrigin)
{
+ int theScalarIter = GetScalarIteration();
+
TSuperClass::SameAs(theOrigin);
if(const ScalarMapOnDeformedShape_i* aPrs3d = dynamic_cast<const ScalarMapOnDeformedShape_i*>(theOrigin)){
ScalarMapOnDeformedShape_i* anOrigin = const_cast<ScalarMapOnDeformedShape_i*>(aPrs3d);
// increment the scalar iteration for using in VISU_TimeAnimation class implementation.
+ int anOriginScalarIter = anOrigin->GetScalarIteration();
this->SetScalarField(anOrigin->GetScalarMeshName().c_str(),
anOrigin->GetScalarFieldName().c_str(),
- anOrigin->GetScalarIteration() + 1,
+ theScalarIter,
anOrigin->GetScalarEntity());
Update();
}