Fix regression in previous commit about going to next page

remotes/origin/Applications/17.04
Albert Astals Cid 9 years ago
parent 618072f8a2
commit 7a9209569c
  1. 9
      ui/presentationwidget.cpp
  2. 1
      ui/presentationwidget.h

@ -146,7 +146,8 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
m_document( doc ), m_frameIndex( -1 ), m_topBar( 0 ), m_pagesEdit( 0 ), m_searchBar( 0 ), m_document( doc ), m_frameIndex( -1 ), m_topBar( 0 ), m_pagesEdit( 0 ), m_searchBar( 0 ),
m_ac( collection ), m_screenSelect( 0 ), m_isSetup( false ), m_blockNotifications( false ), m_inBlackScreenMode( false ), m_ac( collection ), m_screenSelect( 0 ), m_isSetup( false ), m_blockNotifications( false ), m_inBlackScreenMode( false ),
m_showSummaryView( Okular::Settings::slidesShowSummary() ), m_showSummaryView( Okular::Settings::slidesShowSummary() ),
m_advanceSlides( Okular::SettingsCore::slidesAdvance() ) m_advanceSlides( Okular::SettingsCore::slidesAdvance() ),
m_goToNextPageOnRelease( false )
{ {
Q_UNUSED( parent ) Q_UNUSED( parent )
setAttribute( Qt::WA_DeleteOnClose ); setAttribute( Qt::WA_DeleteOnClose );
@ -698,6 +699,8 @@ void PresentationWidget::mousePressEvent( QMouseEvent * e )
overlayClick( e->pos() ); overlayClick( e->pos() );
return; return;
} }
m_goToNextPageOnRelease = true;
} }
// pressing right button // pressing right button
else if ( e->button() == Qt::RightButton ) else if ( e->button() == Qt::RightButton )
@ -721,8 +724,10 @@ void PresentationWidget::mouseReleaseEvent( QMouseEvent * e )
m_pressedLink = 0; m_pressedLink = 0;
} }
// if no other actions, go to next page if ( m_goToNextPageOnRelease ) {
slotNextPage(); slotNextPage();
m_goToNextPageOnRelease = false;
}
} }
void PresentationWidget::mouseMoveEvent( QMouseEvent * e ) void PresentationWidget::mouseMoveEvent( QMouseEvent * e )

@ -146,6 +146,7 @@ class PresentationWidget : public QWidget, public Okular::DocumentObserver
bool m_inBlackScreenMode; bool m_inBlackScreenMode;
bool m_showSummaryView; bool m_showSummaryView;
bool m_advanceSlides; bool m_advanceSlides;
bool m_goToNextPageOnRelease;
private Q_SLOTS: private Q_SLOTS:
void slotNextPage(); void slotNextPage();

Loading…
Cancel
Save