following revert of 23068: Better fix for bug 4044

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23076 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-20 14:53:19 +00:00
parent 42d707773d
commit 2a42f56b4e

View File

@ -1357,23 +1357,16 @@ void BufferView::clearSelection()
void BufferView::resize(int width, int height)
{
bool initialResize = (height_ == 0);
// Update from work area
width_ = width;
height_ = height;
// Clear the paragraph height cache.
d->par_height_.clear();
// Redo the metrics.
updateMetrics();
// view got his initial size, make sure that
// the cursor has a proper position
if (initialResize) {
updateScrollbar();
// Make sure the current cursor is visible.
showCursor();
}
}