]> git.lyx.org Git - lyx.git/commitdiff
* insetcollapsable.C (doDispatch): fix crash in previous patch
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 20 Dec 2006 13:25:46 +0000 (13:25 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 20 Dec 2006 13:25:46 +0000 (13:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16344 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insetcollapsable.C

index c12fb7bed9fc5d6d73f94fa3f108ecc0e10ad026..34c754aa3e29d88d29e93ae2f48de9cac9e9bcc8 100644 (file)
@@ -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();