]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL13029 - scalar bar values aren't stored in case of scalar map on deformed shape
authorasl <asl@opencascade.com>
Mon, 28 Aug 2006 07:22:18 +0000 (07:22 +0000)
committerasl <asl@opencascade.com>
Mon, 28 Aug 2006 07:22:18 +0000 (07:22 +0000)
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h

index ce2da5165f4ae75f784ff0fa83f2c7d93eeeadee..b65bf0c282ed8e167c7b22e3bde0c1602a2436cf 100644 (file)
@@ -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()
index 8ca32d64ee9833a83c83483462d79e4fcf72d2f2..3151bd934c0a93859c38bb09e140c8ef9788f9a7 100644 (file)
@@ -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,