mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-17 23:11:48 +00:00
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:
parent
975de758ba
commit
53a9e0528e
|
@ -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…
Reference in a new issue