diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 2613df3d5d..d90fc5578d 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -379,6 +379,8 @@ void BufferView::Pimpl::scrollDocView(int value) vbt->setCursorFromCoordinates(0, first); else if (vbt->cursor.y() > last) vbt->setCursorFromCoordinates(0, last); + + owner_->updateLayoutChoice(); } @@ -568,8 +570,6 @@ void BufferView::Pimpl::update() void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f) { - owner_->updateLayoutChoice(); - if (!text->selection.set() && (f & SELECT)) { text->selection.cursor = text->cursor; } diff --git a/src/ChangeLog b/src/ChangeLog index d4ec2323cb..e281448021 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2003-03-18 John Levon + + * BufferView_pimpl.C (scrollDocView): add updateLayoutChoice(), + remove it from update() + + * lyxfunc.C: update layout choice after an lfun + + * text3.C: remove extra updateLayoutChoice()s + 2003-03-18 John Levon * text.C: top_y change means full repaint, fix diff --git a/src/lyxfunc.C b/src/lyxfunc.C index c45dfcd7d3..7c3436eee8 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1579,6 +1579,8 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose) break; } // end of switch + view()->owner()->updateLayoutChoice(); + exit_with_message: sendDispatchMessage(getMessage(), ev, verbose); } diff --git a/src/text3.C b/src/text3.C index 8521110de9..13e494e488 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1408,7 +1408,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) // Highly editable inset, like math UpdatableInset * inset = static_cast(inset_hit); selection_possible = false; - bv->owner()->updateLayoutChoice(); bv->owner()->message(inset->editMessage()); //inset->edit(bv, x, y, cmd.button()); // We just have to lock the inset before calling a PressEvent on it! @@ -1433,7 +1432,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) bv->text->selection.cursor = bv->text->cursor; bv->text->cursor.x_fix(bv->text->cursor.x()); - bv->owner()->updateLayoutChoice(); if (bv->fitCursor()) selection_possible = false;