]> git.lyx.org Git - features.git/commitdiff
Fix a crash caused by cur.text() != this for collapsable insets
authorBo Peng <bpeng@lyx.org>
Thu, 28 Dec 2006 03:00:48 +0000 (03:00 +0000)
committerBo Peng <bpeng@lyx.org>
Thu, 28 Dec 2006 03:00:48 +0000 (03:00 +0000)
* src/insets/insetcollapsable.C: test if inset is open before editing

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16406 a592a061-630c-0410-9148-cb99ea01b6c8

Status.15x
src/insets/insetcollapsable.C

index a3360e05857f3698b62db45c71d280ba88e0e541..366c4072eb1112df2e0f3cafdcc437aef1bf9853 100644 (file)
@@ -195,12 +195,6 @@ EDITING
 
 * the insertion of Ctrl-Return cannot be undone
 
-* open a document full of marginal notes (other insets should also work),
-  select multiple insets from the begining twice, lyx crashed with
-    QLayout::addChildWidget: lyx::frontend::QCommandBuffer "" in wrong parent; moved to correct parent
-    Assertion triggered in void lyx::LyXText::dispatch(lyx::LCursor&, lyx::FuncRequest&) by failing check "cur.text() == this" in file src/text3.C:323
-    Abort
-
 
 CHANGE TRACKING
 
@@ -663,3 +657,10 @@ e C:\cygwin\home\ms\lyx-trunk\src\support\filename.C:48
   Odd, isn't it?
   FIXED (Enrico (found problem) and Georg (fix) 2006-12-27)
 
+* open a document full of marginal notes (other insets should also work),
+  select multiple insets from the begining twice, lyx crashed with
+    QLayout::addChildWidget: lyx::frontend::QCommandBuffer "" in wrong parent; moved to correct parent
+    Assertion triggered in void lyx::LyXText::dispatch(lyx::LCursor&, lyx::FuncRequest&) by failing check "cur.text() == this" in file src/text3.C:323
+    Abort
+  FIXED (Bo 2006-12-27)
+
index 34c754aa3e29d88d29e93ae2f48de9cac9e9bcc8..ecbc58f9bbed30ba61dea020a2a4d06c4e475c6e 100644 (file)
@@ -377,7 +377,8 @@ void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
                }
 
                // The mouse click is within the opened inset.
-               InsetText::doDispatch(cur, cmd);
+               if (status() == Open)
+                       InsetText::doDispatch(cur, cmd);
                break;
 
        case LFUN_INSET_TOGGLE: