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
This commit is contained in:
Jürgen Vigna 2002-04-19 13:23:39 +00:00
parent a9a371fb5e
commit 19ba6786a9
4 changed files with 11 additions and 2 deletions

View File

@ -326,10 +326,12 @@ int BufferView::Pimpl::resizeCurrentBuffer()
selection = bv_->text->selection.set(); selection = bv_->text->selection.set();
mark_set = bv_->text->selection.mark(); mark_set = bv_->text->selection.mark();
the_locking_inset = bv_->theLockingInset(); 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; delete bv_->text;
bv_->text = new LyXText(bv_); bv_->text = new LyXText(bv_);
bv_->text->init(bv_); bv_->text->init(bv_);
buffer_->resizeInsets(bv_);
} else { } else {
// See if we have a text in TextCache that fits // See if we have a text in TextCache that fits
// the new buffer_ with the correct width. // the new buffer_ with the correct width.

View File

@ -1,5 +1,8 @@
2002-04-19 Juergen Vigna <jug@sad.it> 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 * text2.C (cursorDown): don't enter the inset if we came from a row
above and are one row over the inset. above and are one row over the inset.

View File

@ -3,6 +3,8 @@
* insettabular.C (insetUnlock): * insettabular.C (insetUnlock):
(insetButtonPress): call an update before setting the_locking_inset = 0 (insetButtonPress): call an update before setting the_locking_inset = 0
as otherwise we don't repaint! 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> 2002-04-18 Juergen Vigna <jug@sad.it>

View File

@ -530,8 +530,10 @@ void InsetTabular::update(BufferView * bv, LyXFont const & font, bool reinit)
case INIT: case INIT:
case FULL: case FULL:
case CELL: case CELL:
if (calculate_dimensions_of_cells(bv, font, false)) if (calculate_dimensions_of_cells(bv, font, false)) {
need_update = INIT; need_update = INIT;
resetPos(bv);
}
break; break;
case SELECTION: case SELECTION:
need_update = FULL; need_update = FULL;