diff --git a/kpdf/kpdf_part.cpp b/kpdf/kpdf_part.cpp index 924c7aabe..37425408d 100644 --- a/kpdf/kpdf_part.cpp +++ b/kpdf/kpdf_part.cpp @@ -382,7 +382,6 @@ void Part::slotNewConfig() // this needs to be hidden explicitly to disable thumbnails gen m_thumbnailList->setShown( showLeft ); } - bool showSearch = Settings::showSearchBar(); if ( m_searchWidget->isShown() != showSearch ) m_searchWidget->setShown( showSearch ); @@ -395,8 +394,12 @@ void Part::slotNewConfig() m_pageView->setHScrollBarMode( scrollBarMode ); m_pageView->setVScrollBarMode( scrollBarMode ); } - // update Main View contents (this should be done only if renderMode changed) + + // update Main View and ThumbnailList contents + // TODO do this only when changing Settings::renderMode() m_pageView->updateContents(); + if ( showLeft && m_thumbnailList->isShown() ) + m_thumbnailList->updateContents(); } void Part::slotPrintPreview() diff --git a/kpdf/thumbnaillist.cpp b/kpdf/thumbnaillist.cpp index 76e06155c..9376a3d6d 100644 --- a/kpdf/thumbnaillist.cpp +++ b/kpdf/thumbnaillist.cpp @@ -334,6 +334,8 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e ) { int width = m_pixmapWidth + 4; QRect clipRect = e->rect(); + if ( !clipRect.isValid() ) + return; QPainter p( this ); // draw the bottom label @@ -357,7 +359,8 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e ) p.translate( 2, 2 ); clipRect.moveBy( -2, -2 ); clipRect = clipRect.intersect( QRect( 0, 0, m_pixmapWidth, m_pixmapHeight ) ); - PagePainter::paintPageOnPainter( m_page, THUMBNAILS_ID, &p, clipRect, m_pixmapWidth, m_pixmapHeight ); + if ( clipRect.isValid() ) + PagePainter::paintPageOnPainter( m_page, THUMBNAILS_ID, &p, clipRect, m_pixmapWidth, m_pixmapHeight ); } }