]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To fix a selection regression
authorapo <apo@opencascade.com>
Fri, 19 Aug 2005 07:16:06 +0000 (07:16 +0000)
committerapo <apo@opencascade.com>
Fri, 19 Aug 2005 07:16:06 +0000 (07:16 +0000)
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_View.cxx
src/SVTK/SVTK_ViewWindow.cxx

index 0817bb6d7992145b805f9e88b1cb1108c6d668a1..1beb16f4347f398f8f10ba48f6680f9c3f6e6f9d 100644 (file)
@@ -1080,8 +1080,6 @@ SVTK_InteractorStyle
   x = mousePos.x(); y = h - mousePos.y() - 1;
 
   this->FindPokedRenderer(x,y);
-  Interactor->StartPickCallback();
-  GetSelector()->StartPickCallback();
 
   SVTK_SelectionEvent aSelectionEvent = GetSelectionEvent();
   aSelectionEvent.myX = x;
@@ -1097,9 +1095,6 @@ SVTK_InteractorStyle
       aLastActor->PreHighlight( this, GetSelector(), this->CurrentRenderer, aSelectionEvent, false );
   }
   
-  Interactor->EndPickCallback();
-  GetSelector()->EndPickCallback();
-
   if(anIsChanged)
     this->Render();
 }
index f4658a99b3be3840b75b0b1064e82d42d98399d5..5a2c02b6596ccf3bea0211c3363f5cfa77b1f4f3 100644 (file)
@@ -39,9 +39,6 @@ SVTK_View
 ::SVTK_View( QWidget* parent, const char* name ) :
   SVTK_RenderWindowInteractor( parent, name )
 {
-  mySelector = SVTK_Selector::New();
-  mySelector->Delete();
-
   myEventCallbackCommand = vtkCallbackCommand::New();
   myEventCallbackCommand->Delete();
 
@@ -49,6 +46,9 @@ SVTK_View
   myPriority = 0.0;
 
   myEventCallbackCommand->SetCallback(SVTK_View::ProcessEvents);
+
+  SetSelector(SVTK_Selector::New());
+  GetSelector()->Delete();
 }
 
 //----------------------------------------------------------------------------
index 8b5dc9bb49edda1d3e60b6ee1d4ceb61773b7c22..e370e20204a4954a9dbfa1a1ae823b327a0b8da4 100755 (executable)
@@ -62,6 +62,7 @@ SVTK_ViewWindow
   myInteractorStyle->setViewWindow( this );
   myInteractorStyle->SetSelector( myView->GetSelector() );
 
+  myInteractorStyle->SetSelector( myView->GetSelector() );
   myView->SetInteractorStyle( myInteractorStyle );
   myView->Initialize();
 
@@ -191,7 +192,7 @@ void
 SVTK_ViewWindow
 ::onSelectionChanged()
 {
-  emit selectionChanged();
+  myView->onSelectionChanged();
 }
 
 //----------------------------------------------------------------