From: Stefan Schimanski Date: Tue, 5 Feb 2008 13:14:53 +0000 (+0000) Subject: * Make sure the cursor is completely visible when the BufferView get's its initial... X-Git-Tag: 1.6.10~6448 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0364c6c3cb7530ef3d9e3939ef47827858da0ab4;p=lyx.git * Make sure the cursor is completely visible when the BufferView get's its initial size. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22786 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 9edd183157..fe8e4c34c6 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1336,6 +1336,8 @@ void BufferView::clearSelection() void BufferView::resize(int width, int height) { + bool initialResize = (height_ == 0); + // Update from work area width_ = width; height_ = height; @@ -1344,6 +1346,13 @@ void BufferView::resize(int width, int height) d->par_height_.clear(); updateMetrics(); + + // view got his initial size, make sure that + // the cursor has a proper position + if (initialResize) { + updateScrollbar(); + showCursor(); + } }