]> git.lyx.org Git - lyx.git/commitdiff
Fix recalculating of row dimensions on a zoom (fix #333).
authorJürgen Vigna <jug@sad.it>
Fri, 19 Apr 2002 13:23:39 +0000 (13:23 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 19 Apr 2002 13:23:39 +0000 (13:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4034 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog
src/insets/ChangeLog
src/insets/insettabular.C

index e0e0556d80472192ff04e7f1cf023c09291f71b6..2a6ad10609eac4b1003e321fdb1511f11ef60397 100644 (file)
@@ -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.
index f26d10b24da18bce51ac3c91d6020c6f99e1fb74..a37aa5c33f32b28156dd4e4cdb9cc5af42ebb31b 100644 (file)
@@ -1,5 +1,8 @@
 2002-04-19  Juergen Vigna  <jug@sad.it>
 
+       * 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.
 
index 5cce432f8d3b4386f188926d00dce78d989d3477..8b25ead5bcdc4f34eeaa76c0399e1dba58d3fb31 100644 (file)
@@ -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  <jug@sad.it>
 
index 08e46dfc03589ce42d91db9a35dda732d10ec8ae..b3a9435665f7321f217d0f6a4bfc2e911ac8f4ce 100644 (file)
@@ -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;