Backport r909668 | aacid | 2009-01-12 01:01:07 +0100 (Mon, 12 Jan 2009) | 2 lines

don't process mouse presses, wheels until the widget has been painted at least once as it initializes some stuff we need

svn path=/branches/KDE/4.2/kdegraphics/okular/; revision=909669
remotes/origin/KDE/4.2
Albert Astals Cid 17 years ago
parent 8113755b8e
commit 6353dea00f
  1. 4
      ui/presentationwidget.cpp

@ -416,6 +416,8 @@ void PresentationWidget::keyPressEvent( QKeyEvent * e )
void PresentationWidget::wheelEvent( QWheelEvent * e )
{
if (m_width == -1) return;
// performance note: don't remove the clipping
int div = e->delta() / 120;
if ( div > 0 )
@ -436,6 +438,8 @@ void PresentationWidget::wheelEvent( QWheelEvent * e )
void PresentationWidget::mousePressEvent( QMouseEvent * e )
{
if (m_width == -1) return;
if ( m_drawingEngine )
{
QRect r = routeMouseDrawingEvent( e );

Loading…
Cancel
Save