]> git.lyx.org Git - features.git/commitdiff
Now hopefully fixed for updates in insets inside this inset text
authorJürgen Vigna <jug@sad.it>
Mon, 11 Mar 2002 11:26:22 +0000 (11:26 +0000)
committerJürgen Vigna <jug@sad.it>
Mon, 11 Mar 2002 11:26:22 +0000 (11:26 +0000)
(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
src/insets/insettext.C

index a300dfe4c8736d44ae7db9becd284d41e05f4ae1..99d3b66983568fe0921e4a3b224f25bb5db1922f 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-11  Juergen Vigna  <jug@sad.it>
+
+       * 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  <jug@sad.it>
 
        * insettabular.C (updateLocal): do a FULL update if we're not locked
index 879e3ffc81656a41c9dd7f610b635d85304fca72..5c16cd5974bbc9dff023355154213c2f54fa42ea 100644 (file)
@@ -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<UpdatableInset *>(inset);
+                       while(tl_inset->owner() && tl_inset->owner() != this)
+                               tl_inset = static_cast<UpdatableInset *>(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);