Use a better way to invalidate the rects of the hidden PageViewItem's.

svn path=/branches/work/kde4/playground/graphics/okular/; revision=532961
This commit is contained in:
Pino Toscano 2006-04-23 12:44:10 +00:00
parent 1ce4f247a4
commit f378bfa9ab
3 changed files with 13 additions and 2 deletions

View file

@ -2114,7 +2114,10 @@ void PageView::slotRelayoutPages()
insertX += colWidth[ cIdx ];
cIdx++;
} else
item->setGeometry( 0, 0, -1, -1 );
// pino: I used invalidate() instead of setGeometry() so
// the geometry rect of the item is really invalidated
//item->setGeometry( 0, 0, -1, -1 );
item->invalidate();
if( cIdx>=nCols)
{
@ -2125,7 +2128,10 @@ void PageView::slotRelayoutPages()
}
}
else
item->setGeometry( 0, 0, -1, -1 );
// pino: I used invalidate() instead of setGeometry() so
// the geometry rect of the item is really invalidated
//item->setGeometry( 0, 0, -1, -1 );
item->invalidate();
}
delete [] colWidth;

View file

@ -91,6 +91,10 @@ void PageViewItem::moveTo( int x, int y )
m_geometry.moveTop( y );
}
void PageViewItem::invalidate()
{
m_geometry.setRect( 0, 0, 0, 0 );
}
/*********************/
/** PageViewMessage */

View file

@ -39,6 +39,7 @@ class PageViewItem
void setGeometry( int x, int y, int width, int height );
void setWHZ( int w, int h, double zoom );
void moveTo( int x, int y );
void invalidate();
private:
const KPDFPage * m_page;