]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Take into account position of actor for selection
authorvsv <vsv@opencascade.com>
Fri, 29 Apr 2005 11:48:39 +0000 (11:48 +0000)
committervsv <vsv@opencascade.com>
Fri, 29 Apr 2005 11:48:39 +0000 (11:48 +0000)
src/VTKViewer/VTKViewer_InteractorStyleSALOME.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx

index 0fd4d7c52d16fafdd40ca2e66fc4506077661f39..3be94d216fe9706bd9f575166410d110a6d08bf9 100644 (file)
@@ -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 ) {
index d8d86e86c3e7c7906d0d2cd7d38fa9a31aa2fdee..28514145311c95351b743fc6782b248cc1eaec0f 100644 (file)
@@ -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);
 }