From ddc4657ab48cc7fc63579298a037a9b33e0be255 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 24 Dec 2008 13:12:23 +0000 Subject: [PATCH] Implementation of the Issue 19931 (EDF 791 VISU : ScalarMapOnDeformed : time stamp by default equal to the DEPL one). --- src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx index 69ff6259..915cda02 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx @@ -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; } } -- 2.39.2