diff --git a/ApplicationLibCode/UserInterface/RiuViewer.cpp b/ApplicationLibCode/UserInterface/RiuViewer.cpp index 4bd9455a06..00a3d7140e 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.cpp +++ b/ApplicationLibCode/UserInterface/RiuViewer.cpp @@ -687,6 +687,21 @@ void RiuViewer::mousePressEvent( QMouseEvent* event ) m_lastMousePressPosition = event->pos(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuViewer::mouseDoubleClickEvent( QMouseEvent* event ) +{ + if ( auto view = dynamic_cast( m_rimView.p() ) ) + { + view->zoomAll(); + + return; + } + + caf::Viewer::mouseDoubleClickEvent( event ); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/UserInterface/RiuViewer.h b/ApplicationLibCode/UserInterface/RiuViewer.h index c22fc0cfd2..942d39088b 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.h +++ b/ApplicationLibCode/UserInterface/RiuViewer.h @@ -166,6 +166,7 @@ private: void mouseReleaseEvent( QMouseEvent* event ) override; void mousePressEvent( QMouseEvent* event ) override; + void mouseDoubleClickEvent( QMouseEvent* event ) override; private: QLabel* m_infoLabel;