Commit 3e6c9356 authored by Enrico Ros's avatar Enrico Ros
Browse files

fix crash

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=360890
parent 02b21704
......@@ -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()
......
......@@ -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 );
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment