From 19ba6786a924c7f9268d79fadb34e0013f8ed37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 19 Apr 2002 13:23:39 +0000 Subject: [PATCH] Fix recalculating of row dimensions on a zoom (fix #333). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4034 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 4 +++- src/ChangeLog | 3 +++ src/insets/ChangeLog | 2 ++ src/insets/insettabular.C | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index e0e0556d80..2a6ad10609 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -326,10 +326,12 @@ int BufferView::Pimpl::resizeCurrentBuffer() selection = bv_->text->selection.set(); mark_set = bv_->text->selection.mark(); the_locking_inset = bv_->theLockingInset(); + buffer_->resizeInsets(bv_); + // I don't think the delete and new are necessary here we just could + // call only init! (Jug 20020419) delete bv_->text; bv_->text = new LyXText(bv_); bv_->text->init(bv_); - buffer_->resizeInsets(bv_); } else { // See if we have a text in TextCache that fits // the new buffer_ with the correct width. diff --git a/src/ChangeLog b/src/ChangeLog index f26d10b24d..a37aa5c33f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-04-19 Juergen Vigna + * BufferView_pimpl.C (resizeCurrentBuffer): resize the insets before + reinitializing the buffer otherwise row-dimensions may be wrong. + * text2.C (cursorDown): don't enter the inset if we came from a row above and are one row over the inset. diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 5cce432f8d..8b25ead5bc 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -3,6 +3,8 @@ * insettabular.C (insetUnlock): (insetButtonPress): call an update before setting the_locking_inset = 0 as otherwise we don't repaint! + (update): reset the cursor position when we changed dimensions as + otherwise our cursor may be on the wrong spot. 2002-04-18 Juergen Vigna diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 08e46dfc03..b3a9435665 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -530,8 +530,10 @@ void InsetTabular::update(BufferView * bv, LyXFont const & font, bool reinit) case INIT: case FULL: case CELL: - if (calculate_dimensions_of_cells(bv, font, false)) + if (calculate_dimensions_of_cells(bv, font, false)) { need_update = INIT; + resetPos(bv); + } break; case SELECTION: need_update = FULL;