From: vsv Date: Fri, 29 Apr 2005 11:48:39 +0000 (+0000) Subject: Take into account position of actor for selection X-Git-Tag: V2_2_0_VISU_improvement_2005-05-27~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=23be894aedc916ff8350ae007158c408880ad0ea;p=modules%2Fkernel.git Take into account position of actor for selection --- diff --git a/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx b/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx index 0fd4d7c52..3be94d216 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx @@ -1217,6 +1217,12 @@ void VTKViewer_InteractorStyleSALOME::onCursorMove(QPoint mousePos) { SALOME_Actor* SActor = SALOME_Actor::SafeDownCast(aPicker->GetActor()); + if (SActor && myPreSelectionActor){ + float aPos[3]; + SActor->GetPosition(aPos); + myPreSelectionActor->SetPosition(aPos); + } + if (vtkCellPicker* picker = vtkCellPicker::SafeDownCast(aPicker)) { int aVtkId = picker->GetCellId(); if ( aVtkId >= 0 ) { diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx index d8d86e86c..285141453 100644 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx @@ -879,6 +879,9 @@ void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfIn TUpdateActor theFun) { (*theFun)(theMapIndex,theMapActor,theActor); + float aPos[3]; + theMapActor->GetPosition(aPos); + theActor->SetPosition(aPos); }