From: rnv Date: Wed, 24 Dec 2008 13:12:23 +0000 (+0000) Subject: Implementation of the Issue 19931 (EDF 791 VISU : ScalarMapOnDeformed : time stamp... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddc4657ab48cc7fc63579298a037a9b33e0be255;p=modules%2Fvisu.git Implementation of the Issue 19931 (EDF 791 VISU : ScalarMapOnDeformed : time stamp by default equal to the DEPL one). --- 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; } }