]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Implementation of the Issue 19931 (EDF 791 VISU : ScalarMapOnDeformed : time stamp...
authorrnv <rnv@opencascade.com>
Wed, 24 Dec 2008 13:12:23 +0000 (13:12 +0000)
committerrnv <rnv@opencascade.com>
Wed, 24 Dec 2008 13:12:23 +0000 (13:12 +0000)
src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx

index 69ff6259573f276eb640676ba81c2b367698d223..915cda022b3a12af1a641c67b8f8f9210018144c 100644 (file)
@@ -427,6 +427,7 @@ void VisuGUI_DeformedShapeAndScalarMapDlg::AddAllFieldNames(){
 
 void VisuGUI_DeformedShapeAndScalarMapDlg::AddAllTimes(const QString& theFieldName){
   TEntity2Fields::const_iterator anIter = myEntity2Fields.begin();
+  int currentTimeStampId = (myTimeStampsCombo->count() > 0) ? myTimeStampsCombo->currentIndex() : 0;
   for(; anIter != myEntity2Fields.end(); anIter++){
     const TFieldName2TimeStamps& aFieldName2TimeStamps = anIter->second;
     TFieldName2TimeStamps::const_iterator aFieldIter = aFieldName2TimeStamps.begin();
@@ -447,6 +448,9 @@ void VisuGUI_DeformedShapeAndScalarMapDlg::AddAllTimes(const QString& theFieldNa
        QString aTimeStampTime = aTimeStampIter->second;
        myTimeStampsCombo->addItem(aTimeStampTime);
       }
+      if(currentTimeStampId >= myTimeStampID.size())
+        currentTimeStampId = myTimeStampID.size()-1;
+      myTimeStampsCombo->setCurrentIndex(currentTimeStampId);
       return;
     }
   }