Commit 56e20047 authored by Albert Astals Cid's avatar Albert Astals Cid

Repaint on config change

Now that the pdf generator does not incorrectly delete the pixmaps
on a config change we need to repaint the viewports in case
there has been a inverted color change or something similar
parent 17b93c08
......@@ -728,6 +728,11 @@ void PageView::reparseConfig()
// Something like invert colors may have changed
// As we don't have a way to find out the old value
// We just update the viewport, this shouldn't be that bad
// since it's just a repaint of pixmaps we already have
KAction *PageView::toggleFormsAction() const
......@@ -407,17 +407,12 @@ bool ThumbnailList::canUnloadPixmap( int pageNumber ) const
void ThumbnailList::updateWidgets()
// find all widgets that intersects the viewport and update them
// Update all visible widgets
QList<ThumbnailWidget *>::const_iterator vIt = d->m_visibleThumbnails.constBegin(), vEnd = d->m_visibleThumbnails.constEnd();
for ( ; vIt != vEnd; ++vIt )
ThumbnailWidget * t = *vIt;
const QRect thumbRect = t->rect().translated( widget()->mapToParent( t->pos() ) );
// update only the exposed area of the widget (saves pixels..)
const QRect relativeRect = thumbRect.intersect( viewport()->rect() );
if ( !relativeRect.isValid() )
t->update( relativeRect );
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