From: enk Date: Fri, 27 May 2005 05:26:32 +0000 (+0000) Subject: Fix bug: X-Git-Tag: JFA_MERGE_TO_3_0_0__2005-07-07~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7a170c4c0029262cfea2f15948c9a71532f817fb;p=modules%2Fkernel.git Fix bug: Bug IPAL8910 T1.5: Graduated scale isn't moved after translate a presentation on Y --- diff --git a/src/VTKViewer/VTKViewer_Utilities.cxx b/src/VTKViewer/VTKViewer_Utilities.cxx index 4bde31f2a..c003d2702 100644 --- a/src/VTKViewer/VTKViewer_Utilities.cxx +++ b/src/VTKViewer/VTKViewer_Utilities.cxx @@ -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; diff --git a/src/VTKViewer/VTKViewer_ViewFrame.cxx b/src/VTKViewer/VTKViewer_ViewFrame.cxx index f83bca586..be5019eb9 100644 --- a/src/VTKViewer/VTKViewer_ViewFrame.cxx +++ b/src/VTKViewer/VTKViewer_ViewFrame.cxx @@ -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="< -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+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="< -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+1]) newbnd[i+1]=abounds[i+1]; + + } + } } - } } - } } if( newbnd[0]-VTK_LARGE_FLOAT && newbnd[3]>-VTK_LARGE_FLOAT && newbnd[5]>-VTK_LARGE_FLOAT){