From 36b485d8423739a8137bb34229d26af0d86bd48c Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Thu, 28 Dec 2006 03:00:48 +0000 Subject: [PATCH] Fix a crash caused by cur.text() != this for collapsable insets * 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 | 13 +++++++------ src/insets/insetcollapsable.C | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Status.15x b/Status.15x index a3360e0585..366c4072eb 100644 --- a/Status.15x +++ b/Status.15x @@ -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) + diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 34c754aa3e..ecbc58f9bb 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -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: -- 2.39.2