]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug GVIEW10280
authorapo <apo@opencascade.com>
Thu, 12 Jan 2006 08:48:31 +0000 (08:48 +0000)
committerapo <apo@opencascade.com>
Thu, 12 Jan 2006 08:48:31 +0000 (08:48 +0000)
   Position of presentations is not restored

src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_CutPlanes_i.cc
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_Vectors_i.cc

index 08857545a1c74e35fdbf29dcae44cc1f5e0ed27f..879b0531b617b305203ecde56bf9350340b47257 100644 (file)
@@ -97,7 +97,8 @@ VISU::Storable* VISU::CutLines_i::Create(const char* theMeshName, VISU::Entity t
 
 VISU::Storable* VISU::CutLines_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetNbLines(VISU::Storable::FindValue(theMap,"myNbLines").toInt());
   SetDisplacement(VISU::Storable::FindValue(theMap,"myDisplacement[0]").toDouble());
   SetDisplacement2(VISU::Storable::FindValue(theMap,"myDisplacement[1]").toDouble());
@@ -132,7 +133,7 @@ VISU::Storable* VISU::CutLines_i::Restore(const Storable::TRestoringMap& theMap)
       SetCurveInverted(i,false);
   }
       
-  return ScalarMap_i::Restore(theMap);
+  return this;
 }
 
 
index ac3784618cce1ec8fa31588ca4fac0cae7e2d39a..d5c0ea04ac4fd0c0057b12bae0c172e453b178d3 100644 (file)
@@ -85,7 +85,8 @@ VISU::Storable* VISU::CutPlanes_i::Create(const char* theMeshName, VISU::Entity
 
 VISU::Storable* VISU::CutPlanes_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetNbPlanes(VISU::Storable::FindValue(theMap,"myNbPlanes").toInt());
   SetDisplacement(VISU::Storable::FindValue(theMap,"myDisplacement").toDouble());
   SetOrientation(VISU::CutPlanes::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
@@ -97,7 +98,7 @@ VISU::Storable* VISU::CutPlanes_i::Restore(const Storable::TRestoringMap& theMap
     if(aCondList[i].toInt() == 0)
       SetPlanePosition(i,aPosList[i].toDouble());
 
-  return ScalarMap_i::Restore(theMap);
+  return this;
 }
 
 
index 478b7dfc5fe7269975b9f78bfad5b0ea855de3de..64f13d0a4504a94eb948bf99e92e825d787ca651 100644 (file)
@@ -113,14 +113,15 @@ VISU::Storable* VISU::DeformedShape_i::Create(const char* theMeshName, VISU::Ent
 
 VISU::Storable* VISU::DeformedShape_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
   myIsColored = VISU::Storable::FindValue(theMap,"myIsColored").toInt();
   myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble();
   myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble();
   myColor.B = VISU::Storable::FindValue(theMap,"myColor.B").toDouble();
 
-  return ScalarMap_i::Restore(theMap);
+  return this;
 }
 
 
index c1e45c917d7929210244c6e8290bd6737e9905a0..4198c8a6497849222fb098c9207f99461cea2058 100644 (file)
@@ -83,13 +83,14 @@ VISU::Storable* VISU::IsoSurfaces_i::Create(const char* theMeshName, VISU::Entit
 
 VISU::Storable* VISU::IsoSurfaces_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetNbSurfaces(VISU::Storable::FindValue(theMap,"myNbSurface").toInt());
   float aMin = VISU::Storable::FindValue(theMap,"myRange[0]").toDouble();
   float aMax = VISU::Storable::FindValue(theMap,"myRange[1]").toDouble();
   SetSubRange(aMin,aMax);
     
-  return ScalarMap_i::Restore(theMap);
+  return this;
 }
 
 void VISU::IsoSurfaces_i::ToStream(std::ostringstream& theStr){
index 8b9fe28fb252c07355f900b89685c2b0e1bc1edb..0cc631b20c278920007658e0fc3ff79aed51ed7c 100644 (file)
@@ -76,7 +76,8 @@ VISU::Storable* VISU::Plot3D_i::Create (const char* theMeshName, VISU::Entity th
 
 VISU::Storable* VISU::Plot3D_i::Restore (const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetOrientation(VISU::Plot3D::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
                 Storable::FindValue(theMap,"aRot[0]").toDouble(),
                 Storable::FindValue(theMap,"aRot[1]").toDouble());
@@ -86,7 +87,7 @@ VISU::Storable* VISU::Plot3D_i::Restore (const Storable::TRestoringMap& theMap)
   SetContourPrs(VISU::Storable::FindValue(theMap,"myContourPrs").toInt());
   SetNbOfContours(VISU::Storable::FindValue(theMap,"myNbOfContours").toInt());
 
-  return ScalarMap_i::Restore(theMap);
+  return this;
 }
 
 void VISU::Plot3D_i::ToStream (std::ostringstream& theStr)
index 939cd3e031fd42e868792dc8c61fa49cfe8fb70c..fbeeb75f5c204a386db9f79602741464f6536c6b 100644 (file)
@@ -122,8 +122,7 @@ VISU::Storable* VISU::StreamLines_i::Create(const char* theMeshName, VISU::Entit
 
 VISU::Storable* VISU::StreamLines_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
-  VISU::Storable* aStorable = DeformedShape_i::Restore(theMap);
+  TSuperClass::Restore(theMap);
 
   double anIntegrationStep = VISU::Storable::FindValue(theMap,"myIntegrationStep").toDouble();
   double aPropagationTime = VISU::Storable::FindValue(theMap,"myPropagationTime").toDouble();
@@ -138,7 +137,7 @@ VISU::Storable* VISU::StreamLines_i::Restore(const Storable::TRestoringMap& theM
            VISU::StreamLines::Direction(aDirection));
   mySourceEntry = VISU::Storable::FindValue(theMap,"mySourceEntry").latin1();
 
-  return aStorable;
+  return this;
 }
 
 
index 2826f8198b254d3d8cd90b28c1a5c82b4f850392..0a93d9fab6d212c75b491cb9a2d4badd204a67b8 100644 (file)
@@ -118,12 +118,13 @@ VISU::Storable* VISU::Vectors_i::Create(const char* theMeshName, VISU::Entity th
 
 VISU::Storable* VISU::Vectors_i::Restore(const Storable::TRestoringMap& theMap)
 {
-  DoHook();
+  TSuperClass::Restore(theMap);
+
   SetGlyphType(VISU::Vectors::GlyphType(VISU::Storable::FindValue(theMap,"myTypeGlyph").toInt()));
   SetGlyphPos(VISU::Vectors::GlyphPos(VISU::Storable::FindValue(theMap,"myPosGlyph").toInt()));
   SetLineWidth(VISU::Storable::FindValue(theMap,"myLineWidth").toDouble());
 
-  return DeformedShape_i::Restore(theMap);
+  return this;
 }