]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug VISU200819975 - Information window is shown in 3D Viewer inspite of corresponding...
authorouv <ouv@opencascade.com>
Fri, 20 Jun 2008 07:46:11 +0000 (07:46 +0000)
committerouv <ouv@opencascade.com>
Fri, 20 Jun 2008 07:46:11 +0000 (07:46 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx

index 810907627eb44d0d73cc0cafa95df8b860f6fc62..ead67d738d8125d51a8e563d38c93c27d708122c 100644 (file)
@@ -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()){