From 3342f2896e16d4d8bd5d3fd962d1187194b5a7bc Mon Sep 17 00:00:00 2001 From: mkr Date: Fri, 13 Jul 2007 14:22:20 +0000 Subject: [PATCH] Porting to Qt4. --- src/SVTK/SVTK_InteractorStyle.cxx | 1 + src/SVTK/SVTK_ViewWindow.cxx | 3 +++ src/VTKViewer/VTKViewer_ViewModel.cxx | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index f9fffd606..a08315798 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -1206,6 +1206,7 @@ SVTK_InteractorStyle } case VTK_INTERACTOR_STYLE_CAMERA_FIT: { + myOtherPoint = mousePos; drawRect(); break; } diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 36b7408cf..454df63ec 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -135,6 +135,9 @@ SVTK_ViewWindow myView = new SVTK_View(myMainWindow); Initialize(myView,theModel); + + anIteractor->getRenderWindow()->Render(); + myMainWindow->onResetView(); } } diff --git a/src/VTKViewer/VTKViewer_ViewModel.cxx b/src/VTKViewer/VTKViewer_ViewModel.cxx index 1c6715863..387b7198e 100755 --- a/src/VTKViewer/VTKViewer_ViewModel.cxx +++ b/src/VTKViewer/VTKViewer_ViewModel.cxx @@ -110,7 +110,7 @@ void VTKViewer_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event) if ( !rwi ) return; - switch(event->button()) { + switch(event->buttons()) { case Qt::LeftButton: rwi->LeftButtonPressed(event) ; break ; @@ -144,7 +144,7 @@ void VTKViewer_Viewer::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event) if ( !rwi ) return; - switch(event->button()) { + switch(event->buttons()) { case Qt::LeftButton: rwi->LeftButtonReleased(event) ; break ; -- 2.39.2