mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix the rebreak and cursor position if we had a CHANGED_IN_DRAW (fix #175).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4035 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
19ba6786a9
commit
43ad9cf095
@ -1075,6 +1075,14 @@ void BufferView::Pimpl::update()
|
|||||||
st = LyXText::NEED_MORE_REFRESH;
|
st = LyXText::NEED_MORE_REFRESH;
|
||||||
bv_->text->setCursor(bv_, bv_->text->cursor.par(),
|
bv_->text->setCursor(bv_, bv_->text->cursor.par(),
|
||||||
bv_->text->cursor.pos());
|
bv_->text->cursor.pos());
|
||||||
|
if (bv_->text->selection.set()) {
|
||||||
|
bv_->text->setCursor(bv_, bv_->text->selection.start,
|
||||||
|
bv_->text->selection.start.par(),
|
||||||
|
bv_->text->selection.start.pos());
|
||||||
|
bv_->text->setCursor(bv_, bv_->text->selection.end,
|
||||||
|
bv_->text->selection.end.par(),
|
||||||
|
bv_->text->selection.end.pos());
|
||||||
|
}
|
||||||
fitc = true;
|
fitc = true;
|
||||||
}
|
}
|
||||||
bv_->text->status(bv_, st);
|
bv_->text->status(bv_, st);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* BufferView_pimpl.C (resizeCurrentBuffer): resize the insets before
|
* BufferView_pimpl.C (resizeCurrentBuffer): resize the insets before
|
||||||
reinitializing the buffer otherwise row-dimensions may be wrong.
|
reinitializing the buffer otherwise row-dimensions may be wrong.
|
||||||
|
(update): reset also the selection cursors if they do exits otherwise
|
||||||
|
their x/y positions 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.
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2002-04-19 Juergen Vigna <jug@sad.it>
|
2002-04-19 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* insettext.C (draw): call a fullRebreak on the row where we had a
|
||||||
|
change and reset the cursor and selection-cursors.
|
||||||
|
|
||||||
* 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!
|
||||||
|
@ -465,6 +465,21 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
while ((row != 0) && (yf < ph)) {
|
while ((row != 0) && (yf < ph)) {
|
||||||
lt->getVisibleRow(bv, y+y_offset+first, int(x), row,
|
lt->getVisibleRow(bv, y+y_offset+first, int(x), row,
|
||||||
y+lt->first_y, cleared);
|
y+lt->first_y, cleared);
|
||||||
|
if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
|
||||||
|
lt->need_break_row = row;
|
||||||
|
if (lt->fullRebreak(bv)) {
|
||||||
|
lt->setCursor(bv, lt->cursor.par(),lt->cursor.pos());
|
||||||
|
if (lt->selection.set()) {
|
||||||
|
lt->setCursor(bv, lt->selection.start,
|
||||||
|
lt->selection.start.par(),
|
||||||
|
lt->selection.start.pos());
|
||||||
|
lt->setCursor(bv, lt->selection.end,
|
||||||
|
lt->selection.end.par(),
|
||||||
|
lt->selection.end.pos());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
y += row->height();
|
y += row->height();
|
||||||
yf += row->height();
|
yf += row->height();
|
||||||
row = row->next();
|
row = row->next();
|
||||||
|
Loading…
Reference in New Issue
Block a user