]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL17675 : TC71: REGR: blinking animation and wrong show.
authormkr <mkr@opencascade.com>
Thu, 13 Nov 2008 11:03:28 +0000 (11:03 +0000)
committermkr <mkr@opencascade.com>
Thu, 13 Nov 2008 11:03:28 +0000 (11:03 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISU_I/VISU_TimeAnimation.cxx

index 2ea7c5266c96a7321fb5a101269e000927fe0c06..6e2d8f244acb5db786a3267aeb1b0db86baab431 100644 (file)
@@ -672,7 +672,7 @@ SetupDlg::SetupDlg (QWidget* theParent,
   aUseSequenceLayout->setMargin( 11 );
 
   QLabel* anIndicesLbl = new QLabel("Indices", myUseSequenceBox);
-  myIndices = new QLineEdit( myUseSequenceBox );
+  myIndices = new QLineEdit( "", myUseSequenceBox );
 
   myValues = new QListBox( myUseSequenceBox );
   myValues->setSelectionMode( QListBox::Extended );
index d377dbf1af44037a474d29d48170016db5833f47..3477a60b94a8fc60a17edd7a51540ad9d4387dd6 100644 (file)
@@ -1551,7 +1551,7 @@ void VISU_TimeAnimation::setAnimationSequence(const char* theSequence)
 //------------------------------------------------------------------------
 char* VISU_TimeAnimation::getAnimationSequence()
 {
-  return (char*)mySequence.latin1();
+  return (char*)(mySequence.isNull() ? "" : mySequence.latin1());
 }
 
 //------------------------------------------------------------------------
@@ -1916,7 +1916,19 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
        if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
          anIsFixedRange = aPrs->IsRangeFixed();
       }
-      aData.myPrs[i]->SameAs(aData.myPrs[0]);
+      if (aData.myPrsType == VISU::TDEFORMEDSHAPEANDSCALARMAP) {
+       if (VISU::DeformedShapeAndScalarMap_i* aDeformedPrs =
+           dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>(aData.myPrs[i])) {
+         //Set correct time stamp number
+         int aTimeStampNum = aDeformedPrs->GetScalarTimeStampNumber();
+         aDeformedPrs->SameAs(aData.myPrs[0]);
+         aDeformedPrs->SetScalarField(aDeformedPrs->GetScalarEntity(),
+                                      aDeformedPrs->GetScalarFieldName(),
+                                      aTimeStampNum);
+       }
+      }
+      else
+       aData.myPrs[i]->SameAs(aData.myPrs[0]);
     }
   }
   string aStr = aAnimSObject->GetID();