diff --git a/ApplicationLibCode/UserInterface/RiuViewer.cpp b/ApplicationLibCode/UserInterface/RiuViewer.cpp index 4bd9455a061..6a82ef5a26d 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.cpp +++ b/ApplicationLibCode/UserInterface/RiuViewer.cpp @@ -684,7 +684,21 @@ void RiuViewer::showHistogram( bool enable ) //-------------------------------------------------------------------------------------------------- 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 c22fc0cfd20..942d39088b4 100644 --- a/ApplicationLibCode/UserInterface/RiuViewer.h +++ b/ApplicationLibCode/UserInterface/RiuViewer.h @@ -166,6 +166,7 @@ public slots: void mouseReleaseEvent( QMouseEvent* event ) override; void mousePressEvent( QMouseEvent* event ) override; + void mouseDoubleClickEvent( QMouseEvent* event ) override; private: QLabel* m_infoLabel;