From a9a6d039d94816ac589e4c9a42351af0a30effac Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 12 Jan 2006 08:48:31 +0000 Subject: [PATCH] Fix for Bug GVIEW10280 Position of presentations is not restored --- src/VISU_I/VISU_CutLines_i.cc | 5 +++-- src/VISU_I/VISU_CutPlanes_i.cc | 5 +++-- src/VISU_I/VISU_DeformedShape_i.cc | 5 +++-- src/VISU_I/VISU_IsoSurfaces_i.cc | 5 +++-- src/VISU_I/VISU_Plot3D_i.cc | 5 +++-- src/VISU_I/VISU_StreamLines_i.cc | 5 ++--- src/VISU_I/VISU_Vectors_i.cc | 5 +++-- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/VISU_I/VISU_CutLines_i.cc b/src/VISU_I/VISU_CutLines_i.cc index 08857545..879b0531 100644 --- a/src/VISU_I/VISU_CutLines_i.cc +++ b/src/VISU_I/VISU_CutLines_i.cc @@ -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; } diff --git a/src/VISU_I/VISU_CutPlanes_i.cc b/src/VISU_I/VISU_CutPlanes_i.cc index ac378461..d5c0ea04 100644 --- a/src/VISU_I/VISU_CutPlanes_i.cc +++ b/src/VISU_I/VISU_CutPlanes_i.cc @@ -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; } diff --git a/src/VISU_I/VISU_DeformedShape_i.cc b/src/VISU_I/VISU_DeformedShape_i.cc index 478b7dfc..64f13d0a 100644 --- a/src/VISU_I/VISU_DeformedShape_i.cc +++ b/src/VISU_I/VISU_DeformedShape_i.cc @@ -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; } diff --git a/src/VISU_I/VISU_IsoSurfaces_i.cc b/src/VISU_I/VISU_IsoSurfaces_i.cc index c1e45c91..4198c8a6 100644 --- a/src/VISU_I/VISU_IsoSurfaces_i.cc +++ b/src/VISU_I/VISU_IsoSurfaces_i.cc @@ -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){ diff --git a/src/VISU_I/VISU_Plot3D_i.cc b/src/VISU_I/VISU_Plot3D_i.cc index 8b9fe28f..0cc631b2 100644 --- a/src/VISU_I/VISU_Plot3D_i.cc +++ b/src/VISU_I/VISU_Plot3D_i.cc @@ -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) diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index 939cd3e0..fbeeb75f 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -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; } diff --git a/src/VISU_I/VISU_Vectors_i.cc b/src/VISU_I/VISU_Vectors_i.cc index 2826f819..0a93d9fa 100644 --- a/src/VISU_I/VISU_Vectors_i.cc +++ b/src/VISU_I/VISU_Vectors_i.cc @@ -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; } -- 2.39.2