From: rnv Date: Fri, 13 May 2011 12:37:08 +0000 (+0000) Subject: Store/restore position of the PointMap3D. X-Git-Tag: V6_3_BR20110517~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b2642a4bc70cfdfd15a275921e5e40fc2cf4f9d;p=modules%2Fvisu.git Store/restore position of the PointMap3D. --- diff --git a/src/VISU_I/VISU_PointMap3d_i.cc b/src/VISU_I/VISU_PointMap3d_i.cc index f151528b..3e38a586 100644 --- a/src/VISU_I/VISU_PointMap3d_i.cc +++ b/src/VISU_I/VISU_PointMap3d_i.cc @@ -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