From: ouv Date: Fri, 20 Jun 2008 07:46:11 +0000 (+0000) Subject: Bug VISU200819975 - Information window is shown in 3D Viewer inspite of corresponding... X-Git-Tag: TG_VISU_2008_2008-06-26~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec18f208df755686ea7e4d5943408614d3577e31;p=modules%2Fvisu.git Bug VISU200819975 - Information window is shown in 3D Viewer inspite of corresponding check box was not activated in ?Selection Info? dialog --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 81090762..ead67d73 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -927,6 +927,8 @@ VISU_GaussPtsAct if(!mySelector.GetPointer()) return; + VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get(); + Selection_Mode aSelectionMode = mySelector->SelectionMode(); bool anInitialHasIndex = isSubElementsHighlighted() && mySelectionMode == GaussPointSelection; @@ -935,11 +937,12 @@ VISU_GaussPtsAct mySelector->GetIndex( getIO(), aMapIndex ); bool aCurrentHasIndex = aMapIndex.Extent() == 1; bool anIsVisible = GetVisibility() && aCurrentHasIndex && theIsHighlight; + bool aShowTextActor = aPickingSettings->GetInfoWindowEnabled(); myOutlineActor->SetVisibility(false); myCursorPyramid->SetVisibility(false); - myTextActor->SetVisibility(anIsVisible); + myTextActor->SetVisibility(anIsVisible && aShowTextActor); myCellActor->SetVisibility(anIsVisible); GetScalarBarCtrl()->SetIsMarked(anIsVisible); myCursorPyramidSelected->SetVisibility(anIsVisible); @@ -947,13 +950,14 @@ VISU_GaussPtsAct myIsSubElementsHighlighted = aCurrentHasIndex; - VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get(); - // Zoom if necessary - ChangeZoom(aPickingSettings, - GetRenderer(), - anInitialHasIndex, - aCurrentHasIndex); + if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() ) + { + ChangeZoom(aPickingSettings, + GetRenderer(), + anInitialHasIndex, + aCurrentHasIndex); + } if( aSelectionMode == ActorSelection ) { Superclass::Highlight(theIsHighlight); @@ -988,17 +992,20 @@ VISU_GaussPtsAct return; // FlyTo - vtkRenderWindowInteractor* anInteractor = myInteractor; - vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); - int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); + if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() ) + { + vtkRenderWindowInteractor* anInteractor = myInteractor; + vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); + int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); - anInteractor->SetDolly(0.0); - anInteractor->SetNumberOfFlyFrames(aPickingSettings->GetStepNumber()); - anInteractor->FlyTo(aRenderer, aNodeCoord); - aRenderer->ResetCameraClippingRange(); - anInteractor->SetDolly(aDollyWas); - anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas); - anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord); + anInteractor->SetDolly(0.0); + anInteractor->SetNumberOfFlyFrames(aPickingSettings->GetStepNumber()); + anInteractor->FlyTo(aRenderer, aNodeCoord); + aRenderer->ResetCameraClippingRange(); + anInteractor->SetDolly(aDollyWas); + anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas); + anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord); + } // std::ostringstream aStr; // int anObjId = aMapIndex(1); @@ -1068,7 +1075,7 @@ VISU_GaussPtsAct myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency()); myTextActor->SetWorldPoint(aWorldCoord); myTextActor->SetText(aString.c_str()); - myTextActor->SetVisibility(anIsVisible && theIsHighlight); + myTextActor->SetVisibility(anIsVisible && theIsHighlight && aShowTextActor); // // myCellActor if(aPickingSettings->GetDisplayParentMesh()){