From 16957b903026c6edcda19a26ec9a2c2c66c1d814 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 28 Aug 2006 07:22:18 +0000 Subject: [PATCH] PAL13029 - scalar bar values aren't stored in case of scalar map on deformed shape --- .../VisuGUI_ScalarMapOnDeformedShapeDlg.cxx | 18 ++++++++++-------- .../VisuGUI_ScalarMapOnDeformedShapeDlg.h | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx index ce2da516..b65bf0c2 100644 --- a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx @@ -293,7 +293,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject myFieldsCombo->setCurrentText(aFieldName); AddAllTimes(myFieldsCombo->currentText()); myTimeStampsCombo->setCurrentText(aIteration); - SetScalarField(); + SetScalarField( false ); myScalarPane->initFromPrsObject(myPrs); } @@ -314,7 +314,7 @@ int VisuGUI_ScalarMapOnDeformedShapeDlg::storeToPrsObject myTimeStampsCombo->currentItem() + 1, myPrs->GetScalarEntity()); - if (theUpdateScalars) SetScalarField(); + if (theUpdateScalars) SetScalarField( false ); thePrs->ShowColored(true); @@ -349,11 +349,11 @@ VISU::TEntity VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarEntity(){ return anEntity; } -void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(){ - SetScalarField(myTimeStampsCombo->currentItem()+1); +void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField( const bool save_scalar_pane ){ + SetScalarField( myTimeStampsCombo->currentItem()+1, "", save_scalar_pane ); } -void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString theFieldName){ +void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString theFieldName, const bool save_scalar_pane ){ QString aFieldName; @@ -369,9 +369,11 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField(int theIter,QString the theIter, anEntity); - myScalarPane->storeToPrsObject(myPrs); - - UpdateScalarField(); + if( save_scalar_pane ) + { + myScalarPane->storeToPrsObject(myPrs); + UpdateScalarField(); + } } void VisuGUI_ScalarMapOnDeformedShapeDlg::accept() diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h index 8ca32d64..3151bd93 100644 --- a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h +++ b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h @@ -69,7 +69,7 @@ public: QString getCurrentScalarFieldName(); int getCurrentScalarNbIterations(); VISU::TEntity getCurrentScalarEntity(); - void SetScalarField(int theIter,QString theFieldName=QString("")); + void SetScalarField(int theIter,QString theFieldName=QString(""), const bool = true ); private: void keyPressEvent( QKeyEvent* e ); @@ -105,7 +105,7 @@ private: protected: void UpdateScalarField(); - void SetScalarField(); + void SetScalarField( const bool = true ); void AddAllFieldNames(); void AddAllTimes(const QString& theFieldName); float GetFloatValueOfTimeStamp(const char* theMeshName, -- 2.39.2