From 0364c6c3cb7530ef3d9e3939ef47827858da0ab4 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Tue, 5 Feb 2008 13:14:53 +0000 Subject: [PATCH] * 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 --- src/BufferView.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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(); + } } -- 2.39.5