]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/QT/SimpleMPRWidget.cxx
...
[cpPlugins.git] / lib / cpExtensions / QT / SimpleMPRWidget.cxx
index 7e338bc0b77c486e8f2c813f3f20383b838e0580..fe67abcb5e93d1669956b969186bb1e99b33ad8d 100644 (file)
@@ -240,20 +240,15 @@ AddMeshActor( vtkProp3D* actor, const std::string& name )
 {
   if( actor != NULL )
   {
-    std::cout << name << " " << actor << std::endl;
-
     this->m_Renderers[ 3 ]->AddViewProp( actor );
     this->m_VTK[ 3 ]->GetRenderWindow( )->Render( );
     this->m_NamedActors[ name ].insert( actor );
-    std::cout << "Size: " << this->m_NamedActors.size( ) << " " << this->m_NamedActors[ name ].size( ) << std::endl;
-
+    if( this->m_Renderers[ 3 ]->GetViewProps( )->GetNumberOfItems( ) == 1 )
+    {
+      this->m_Renderers[ 3 ]->ResetCamera( );
+      this->m_VTK[ 3 ]->GetRenderWindow( )->Render( );
 
-    double bounds[ 6 ];
-    this->m_Renderers[ 3 ]->ComputeVisiblePropBounds( bounds );
-    std::cout
-      << bounds[ 0 ] << " " << bounds[ 1 ] << " "
-      << bounds[ 2 ] << " " << bounds[ 3 ] << " "
-      << bounds[ 4 ] << " " << bounds[ 5 ] << std::endl;
+    } // fi
 
   } // fi
 }