mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-12 20:51:17 +00:00
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:
parent
1ce4f247a4
commit
f378bfa9ab
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue