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

svn path=/trunk/KDE/kdegraphics/okular/; revision=909668
This commit is contained in:
Albert Astals Cid 2009-01-12 00:01:07 +00:00
parent 975de758ba
commit 53a9e0528e

View file

@ -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 );