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,24 +1357,17 @@ void BufferView::clearSelection()
void BufferView::resize(int width, int height) void BufferView::resize(int width, int height)
{ {
bool initialResize = (height_ == 0);
// Update from work area // Update from work area
width_ = width; width_ = width;
height_ = height; height_ = height;
// Clear the paragraph height cache. // Clear the paragraph height cache.
d->par_height_.clear(); d->par_height_.clear();
// Redo the metrics.
updateMetrics(); updateMetrics();
// Make sure the current cursor is visible.
// view got his initial size, make sure that
// the cursor has a proper position
if (initialResize) {
updateScrollbar();
showCursor(); showCursor();
} }
}
Inset const * BufferView::getCoveringInset(Text const & text, Inset const * BufferView::getCoveringInset(Text const & text,