From: dmv Date: Tue, 24 Feb 2009 11:41:01 +0000 (+0000) Subject: IPAL20024 3D view is restored incorrectly after DumpStudy X-Git-Tag: V4_1_0_maintainance_20090306 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2639e2a4b73c5d1e08da3aa094d6859c5fab6dfc;p=modules%2Fvisu.git IPAL20024 3D view is restored incorrectly after DumpStudy --- diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 511ae462..4e7f6d00 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -1763,7 +1763,42 @@ void VisuGUI_Module::storeVisualParameters(int savePoint) } } // hasIO - } // salome_actor successfull downcast + } // salome_actor successfull downcast to the VISU_Actor + else if ( VISU_PointMap3dActor* vActor = VISU_PointMap3dActor::SafeDownCast( actor ) ) { // PointMap3D + if ( vActor->hasIO() ) { // actor corresponds to existing obj + Handle(SALOME_InteractiveObject) io = vActor->getIO(); + // entry is "ecoded" = it does NOT contain component adress, since it is a + // subject to change on next component loading + std::string entry = ip->encodeEntry( io->getEntry(), componentName ); + + std::string param, vtkParam = vType.latin1(); vtkParam += gSeparator; + vtkParam += QString::number( *viewsCounter ).latin1(); vtkParam += gSeparator; + + param = vtkParam + "Visibility"; + ip->setParameter( entry, param, "On" ); + param = vtkParam + "Name"; + ip->setParameter( entry, param, vActor->getName() ); + param = vtkParam + "RepresentationMode"; + ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() ); + param = vtkParam + "Opacity"; + ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() ); + vtkFloatingPointType r, g, b; + vActor->GetColor(r, g, b); + QString colorStr = QString::number( r ); colorStr += gDigitsSep; + colorStr += QString::number( g ); colorStr += gDigitsSep; + colorStr += QString::number( b ); + param = vtkParam + "Color"; + ip->setParameter( entry, param, colorStr.latin1() ); + param = vtkParam + "LineWidth"; + ip->setParameter( entry, param, QString::number( vActor->GetLineWidth() ).latin1() ); + if ( vActor->IsShrunkable() && vActor->IsShrunk() ) { + param = vtkParam + "ShrinkMode"; + ip->setParameter( entry, param, "On" ); + param = vtkParam + "ShrinkFactor"; + ip->setParameter( entry, param, QString::number( vActor->GetShrinkFactor() ).latin1() ); + } + } + } // salome actor is downcasted to the VISU_PointMapActor } // isVisible } // end of ..while.. actors traversal } // if ( vtkView )