]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL8992: fix Restore() & ToStream()
authoreap <eap@opencascade.com>
Tue, 31 May 2005 06:14:28 +0000 (06:14 +0000)
committereap <eap@opencascade.com>
Tue, 31 May 2005 06:14:28 +0000 (06:14 +0000)
src/VISU_I/VISU_Plot3D_i.cc

index 9a13def089707080b9d64f3908dfd2a3573c73df..4b6689915179bee875b5523600a6940f2e891457 100644 (file)
@@ -51,13 +51,14 @@ VISU::Storable* VISU::Plot3D_i::Create (const char* theMeshName, VISU::Entity th
 VISU::Storable* VISU::Plot3D_i::Restore (const Storable::TRestoringMap& theMap)
 {
   DoHook();
-  SetNbOfContours(VISU::Storable::FindValue(theMap,"myNbOfContours").toInt());
-  SetScaleFactor(VISU::Storable::FindValue(theMap,"myScaleFactor").toDouble());
   SetOrientation(VISU::Plot3D::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
                 Storable::FindValue(theMap,"aRot[0]").toDouble(),
                 Storable::FindValue(theMap,"aRot[1]").toDouble());
   SetPlanePosition(VISU::Storable::FindValue(theMap,"myPlanePosition").toDouble(),
                   VISU::Storable::FindValue(theMap,"myPlaneCondition").toInt());
+  SetScaleFactor(VISU::Storable::FindValue(theMap,"myScaleFactor").toDouble());
+  SetContourPrs(VISU::Storable::FindValue(theMap,"myContourPrs").toInt());
+  SetNbOfContours(VISU::Storable::FindValue(theMap,"myNbOfContours").toInt());
 
   return ScalarMap_i::Restore(theMap);
 }
@@ -66,13 +67,14 @@ void VISU::Plot3D_i::ToStream (std::ostringstream& theStr)
 {
   ScalarMap_i::ToStream(theStr);
 
-  Storable::DataToStream(theStr, "myNbOfContours", int(GetNbOfContours()));
-  Storable::DataToStream(theStr, "myScaleFactor", GetScaleFactor());
   Storable::DataToStream(theStr, "myBasePlane", int(GetOrientationType()));
-  Storable::DataToStream(theStr, "aRot[0]", 0);
-  Storable::DataToStream(theStr, "aRot[1]", 0);
+  Storable::DataToStream(theStr, "aRot[0]", GetRotateX());
+  Storable::DataToStream(theStr, "aRot[1]", GetRotateY());
   Storable::DataToStream(theStr, "myPlanePosition", GetPlanePosition());
   Storable::DataToStream(theStr, "myPlaneCondition", int(IsPositionRelative()));
+  Storable::DataToStream(theStr, "myScaleFactor", GetScaleFactor());
+  Storable::DataToStream(theStr, "myContourPrs", int(GetIsContourPrs()));
+  Storable::DataToStream(theStr, "myNbOfContours", int(GetNbOfContours()));
 }
 
 VISU::Plot3D_i::~Plot3D_i(){