From a2b7ce74b28bf7d418e426f14642b7550af013e4 Mon Sep 17 00:00:00 2001 From: Alexander Schlarb Date: Sat, 8 Jul 2017 12:24:36 +0200 Subject: [PATCH] Support Forward and Backward mouse buttons in presentation mode REVIEW: 130172 --- ui/presentationwidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index 8035d38f9..c20ffdd3f 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -702,8 +702,14 @@ void PresentationWidget::mousePressEvent( QMouseEvent * e ) m_goToNextPageOnRelease = true; } - // pressing right button - else if ( e->button() == Qt::RightButton ) + // pressing the "move forward" mouse button: unlike the left button this + // always means "show next page", so we unconditionally delegate to that + // action on mouse button press + else if ( e->button() == Qt::ForwardButton ) { + slotNextPage(); + } + // pressing right or backward button + else if ( e->button() == Qt::RightButton || e->button() == Qt::BackButton ) slotPrevPage(); }