]> git.lyx.org Git - lyx.git/commitdiff
* Make sure the cursor is completely visible when the BufferView get's its initial...
authorStefan Schimanski <sts@lyx.org>
Tue, 5 Feb 2008 13:14:53 +0000 (13:14 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 5 Feb 2008 13:14:53 +0000 (13:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22786 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 9edd183157e5309333d5d98bfc10818167e29bf9..fe8e4c34c67e4b582cfa38c99d6d5881107c16bc 100644 (file)
@@ -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();
+       }
 }