From dde058d322f6174c6267037779d84f69b7b8b19e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Tue, 8 Jan 2002 15:32:11 +0000 Subject: [PATCH] Update the toolbar if we unlock an inset (or change paragraph). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3317 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 3 +-- src/frontends/xforms/FormParagraph.C | 4 ++++ src/insets/insettext.C | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index ef79987295..ade488ad3a 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -3412,8 +3412,7 @@ void BufferView::Pimpl::updateInset(Inset * inset, bool mark_dirty) return; } } else if (bv_->theLockingInset()->updateInsetInInset(bv_, inset)) { - if (bv_->text->updateInset(bv_, - bv_->theLockingInset())) { + if (bv_->text->updateInset(bv_, bv_->theLockingInset())) { update(); if (mark_dirty){ buffer_->markDirty(); diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 8d7840e82f..141e144791 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -76,6 +76,10 @@ void FormParagraph::changedParagraph() Paragraph const * const p = getCurrentParagraph(); if (p == 0 || p == par_) return; +#warning Please someone of you GUII people have a look at this! + // shouldn't we chage the par_ pointer too? + // anyway for me the below function does just nothing! + // (Jug 20020108) // For now don't bother checking if the params are different, // just activate the Apply button diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 01bc80c141..a7558b1b15 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -615,6 +615,9 @@ void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty) const lt = 0; if (flag) bv->updateInset(const_cast(this), mark_dirty); + else + bv->fitCursor(); + if (need_update == CURSOR) need_update = NONE; bv->owner()->showState(); @@ -947,7 +950,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button) } lt->setCursorFromCoordinates(bv, x - drawTextXOffset, - y + insetAscent); + y + insetAscent); // set the selection cursor! lt->selection.cursor = lt->cursor; lt->cursor.x_fix(lt->cursor.x()); @@ -961,6 +964,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button) lt->clearSelection(); if (clear) lt = 0; + updateLocal(bv, CURSOR, false); } bv->owner()->setLayout(cpar(bv)->getLayout()); old_par = cpar(bv); -- 2.39.5