Salome HOME
Fix bug:
authorenk <enk@opencascade.com>
Fri, 27 May 2005 05:26:32 +0000 (05:26 +0000)
committerenk <enk@opencascade.com>
Fri, 27 May 2005 05:26:32 +0000 (05:26 +0000)
Bug IPAL8910
  T1.5: Graduated scale isn't moved after translate a presentation on Y

src/VTKViewer/VTKViewer_Utilities.cxx
src/VTKViewer/VTKViewer_ViewFrame.cxx

index 4bde31f2ae8c28cac31a9244540817a7f3b7f5ec..c003d2702c8e2a55723bf65f7666ec0a744df054 100644 (file)
@@ -202,7 +202,7 @@ bool ComputeTrihedronSize( vtkRenderer* theRenderer,double& theNewSize,
   if ( ComputeVisiblePropBounds( theRenderer, bnd ) == 0 )
   {
     bnd[ 1 ] = bnd[ 3 ] = bnd[ 5 ] = 100;
-    bnd[ 0 ] = bnd[ 2 ] = bnd[ 100 ] = 0;
+    bnd[ 0 ] = bnd[ 2 ] = bnd[ 4 ] = 0;
   }
   float aLength = 0;
 
index f83bca586e334566e1f403ed635075824ed1eacf..be5019eb9acfb63967bfad940769d66ac8504f14 100644 (file)
@@ -230,39 +230,36 @@ void VTKViewer_ViewFrame::AdjustTrihedrons(const bool forced)
     if(aTDisplayed) m_Triedron->VisibilityOn();
     if(aCDisplayed) m_CubeAxes->VisibilityOn();
     
-    if ( isComputeTrihedronSize )
-    {
-      m_Triedron->SetSize( aNewSize );
-      // itearte throuh displayed objects and set size if necessary
-
-      vtkActorCollection* anActors = getRenderer()->GetActors();
-      anActors->InitTraversal();
-      while( vtkActor* anActor = anActors->GetNextActor() )
+    m_Triedron->SetSize( aNewSize );
+    // itearte throuh displayed objects and set size if necessary
+    
+    vtkActorCollection* anActors = getRenderer()->GetActors();
+    anActors->InitTraversal();
+    while( vtkActor* anActor = anActors->GetNextActor() )
       {
         if( SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast( anActor ) )
-        {
-          if ( aSActor->IsResizable() )
-            aSActor->SetSize( 0.5 * aNewSize );
-         if( aSActor->GetVisibility()){
-           float abounds[6];
-           aSActor->GetBounds(abounds);
-           if(MYDEBUG)
-             cout << "Bounds: Actor="<<aSActor<<"\n"
-                  << "\txMin=" << abounds[ 0 ] << " xMax=" << abounds[ 1 ] << "\n"
-                  << "\tyMin=" << abounds[ 2 ] << " yMax=" << abounds[ 3 ] << "\n"
-                  << "\tzMin=" << abounds[ 4 ] << " zMax=" << abounds[ 5 ] << "\n";
-           if (  abounds[0] > -VTK_LARGE_FLOAT && abounds[1] < VTK_LARGE_FLOAT &&
-                 abounds[2] > -VTK_LARGE_FLOAT && abounds[3] < VTK_LARGE_FLOAT &&
-                 abounds[4] > -VTK_LARGE_FLOAT && abounds[5] < VTK_LARGE_FLOAT)
-             for(int i=0;i<5;i=i+2){
-               if(abounds[i]<newbnd[i]) newbnd[i]=abounds[i];
-               if(abounds[i+1]>newbnd[i+1]) newbnd[i+1]=abounds[i+1];
-               
-             }
+         {
+           if ( aSActor->IsResizable() )
+             aSActor->SetSize( 0.5 * aNewSize );
+           if( aSActor->GetVisibility()){
+             float abounds[6];
+             aSActor->GetBounds(abounds);
+             if(MYDEBUG)
+               cout << "Bounds: Actor="<<aSActor<<"\n"
+                    << "\txMin=" << abounds[ 0 ] << " xMax=" << abounds[ 1 ] << "\n"
+                    << "\tyMin=" << abounds[ 2 ] << " yMax=" << abounds[ 3 ] << "\n"
+                    << "\tzMin=" << abounds[ 4 ] << " zMax=" << abounds[ 5 ] << "\n";
+             if (  abounds[0] > -VTK_LARGE_FLOAT && abounds[1] < VTK_LARGE_FLOAT &&
+                   abounds[2] > -VTK_LARGE_FLOAT && abounds[3] < VTK_LARGE_FLOAT &&
+                   abounds[4] > -VTK_LARGE_FLOAT && abounds[5] < VTK_LARGE_FLOAT)
+               for(int i=0;i<5;i=i+2){
+                 if(abounds[i]<newbnd[i]) newbnd[i]=abounds[i];
+                 if(abounds[i+1]>newbnd[i+1]) newbnd[i+1]=abounds[i+1];
+                 
+               }
+           }
          }
-        }
       }
-    }
   }
   if( newbnd[0]<VTK_LARGE_FLOAT && newbnd[2]<VTK_LARGE_FLOAT && newbnd[4]<VTK_LARGE_FLOAT &&
       newbnd[1]>-VTK_LARGE_FLOAT && newbnd[3]>-VTK_LARGE_FLOAT && newbnd[5]>-VTK_LARGE_FLOAT){