From 9c513e90d1e521c216c2fbcd37e96e649e1404d4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 20 Dec 2006 13:25:46 +0000 Subject: [PATCH] * insetcollapsable.C (doDispatch): fix crash in previous patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16344 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/insetcollapsable.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index c12fb7bed9..34c754aa3e 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -356,8 +356,11 @@ void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd) break; } - if (cmd.button() == mouse_button::button1 && hitButton(cmd) - && !cur.selection()) { + if (cmd.button() == mouse_button::button1 && hitButton(cmd)) { + // if we are selecting, we do not want to + // toggle the inset. + if (cur.selection()) + break; // Left button is clicked, the user asks to // toggle the inset visual state. cur.dispatched();