From 1697b194fd56aaef4fac7061a3d50d69f9e41648 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 19 Aug 2005 07:16:06 +0000 Subject: [PATCH] To fix a selection regression --- src/SVTK/SVTK_InteractorStyle.cxx | 5 ----- src/SVTK/SVTK_View.cxx | 6 +++--- src/SVTK/SVTK_ViewWindow.cxx | 3 ++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 0817bb6d7..1beb16f43 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -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(); } diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index f4658a99b..5a2c02b65 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -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(); } //---------------------------------------------------------------------------- diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 8b5dc9bb4..e370e2020 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -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(); } //---------------------------------------------------------------- -- 2.39.2