From 471fe41fde97476b5bd34e387d4ecc844cec2c4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Mon, 11 Mar 2002 11:26:22 +0000 Subject: [PATCH] Now hopefully fixed for updates in insets inside this inset text (don't know why I missed this earlier fix #263). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3705 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insettext.C | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index a300dfe4c8..99d3b66983 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Juergen Vigna + + * insettext.C (updateInsetInInset): fixed for updates in insets inside + this inset text (don't know why I missed this earlier). + 2002-03-08 Juergen Vigna * insettabular.C (updateLocal): do a FULL update if we're not locked diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 879e3ffc81..5c16cd5974 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -870,11 +870,26 @@ bool InsetText::updateInsetInInset(BufferView * bv, Inset * inset) clear = true; } if (inset->owner() != this) { - bool found = the_locking_inset->updateInsetInInset(bv, inset); + int ustat = CURSOR_PAR; + bool found = false; + UpdatableInset * tl_inset = the_locking_inset; + if (tl_inset) + found = tl_inset->updateInsetInInset(bv, inset); + if (!found) { + tl_inset = static_cast(inset); + while(tl_inset->owner() && tl_inset->owner() != this) + tl_inset = static_cast(tl_inset->owner()); + if (!tl_inset->owner()) + return false; + found = tl_inset->updateInsetInInset(bv, inset); + ustat = FULL; + } + if (found) + lt->updateInset(bv, tl_inset); if (clear) lt = 0; if (found) - setUpdateStatus(bv, CURSOR_PAR); + setUpdateStatus(bv, ustat); return found; } bool found = lt->updateInset(bv, inset); -- 2.39.5