From c4bf41e87a3567a632ca7c7b01a3504d2e166ead Mon Sep 17 00:00:00 2001 From: Mathieu Doucet <doucetm@ornl.gov> Date: Wed, 13 Jul 2011 21:55:25 +0000 Subject: [PATCH] Remove slow refresh calls. Re #3345 --- .../src/Mantid/InstrumentWidget/InstrumentWindow.cpp | 2 +- .../src/Mantid/InstrumentWidget/Projection3D.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp index 2a9349dd872..68cc0e6b6e3 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp @@ -279,7 +279,7 @@ void InstrumentWindow::tabChanged(int i) if (surface) { setInfoText(surface->getInfoText()); - m_InstrumentDisplay->refreshView(); + //m_InstrumentDisplay->refreshView(); } } diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp index a85826bed76..f305d5b41be 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Projection3D.cpp @@ -204,24 +204,26 @@ void Projection3D::mousePressEventMove(QMouseEvent* event) void Projection3D::mouseMoveEventMove(QMouseEvent* event) { + m_viewChanged = false; if (event->buttons() & Qt::LeftButton) { m_trackball->generateRotationTo(event->x(),event->y()); m_trackball->initRotationFrom(event->x(),event->y()); + m_viewChanged = true; } else if(event->buttons() & Qt::RightButton) { //Translate m_trackball->generateTranslationTo(event->x(),event->y()); m_trackball->initTranslateFrom(event->x(),event->y()); + m_viewChanged = true; } else if(event->buttons() & Qt::MidButton) { //Zoom m_trackball->generateZoomTo(event->x(),event->y()); m_trackball->initZoomFrom(event->x(),event->y()); + m_viewChanged = true; } - m_viewChanged = true; -// } - OpenGLError::check("GL3DWidget::mouseMoveEvent"); + OpenGLError::check("GL3DWidget::mouseMoveEvent"); } void Projection3D::mouseReleaseEventMove(QMouseEvent*) -- GitLab