]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Store/restore position of the PointMap3D.
authorrnv <rnv@opencascade.com>
Fri, 13 May 2011 12:37:08 +0000 (12:37 +0000)
committerrnv <rnv@opencascade.com>
Fri, 13 May 2011 12:37:08 +0000 (12:37 +0000)
src/VISU_I/VISU_PointMap3d_i.cc

index f151528b21426a6310aa3880a20db9ab890ca8ac..3e38a586c902c214db350146bdd385f32dec3720 100644 (file)
@@ -602,6 +602,18 @@ VISU::Storable* VISU::PointMap3d_i::Restore( const Storable::TRestoringMap& theM
   myLabelColor[1] = VISU::Storable::FindValue(theMap,"myLabelColor[1]").toFloat();
   myLabelColor[2] = VISU::Storable::FindValue(theMap,"myLabelColor[2]").toFloat();
 
+  bool isFound = false;
+  QString x,y,z;
+  
+  x = VISU::Storable::FindValue(theMap,"myOffset[0]",&isFound);
+  y = VISU::Storable::FindValue(theMap,"myOffset[1]",&isFound);
+  z = VISU::Storable::FindValue(theMap,"myOffset[2]",&isFound);
+  if(isFound) {
+    myOffset[0] = x.toFloat();
+    myOffset[1] = y.toFloat();
+    myOffset[2] = z.toFloat();
+  }
+
   myParamsTime.Modified();
   return Build( true );
 }
@@ -649,6 +661,10 @@ void VISU::PointMap3d_i::ToStream( std::ostringstream& theStr )
   Storable::DataToStream( theStr, "myLabelColor[0]",  myLabelColor[0] );
   Storable::DataToStream( theStr, "myLabelColor[1]",  myLabelColor[1] );
   Storable::DataToStream( theStr, "myLabelColor[2]",  myLabelColor[2] );
+
+  Storable::DataToStream( theStr, "myOffset[0]", myOffset[0] );
+  Storable::DataToStream( theStr, "myOffset[1]", myOffset[1] );
+  Storable::DataToStream( theStr, "myOffset[2]", myOffset[2] );
 }
 /*!
   Called from engine to restore table from the file