]> git.lyx.org Git - lyx.git/commitdiff
* insetcollapsable.C (doDispatch): do nothing on mouse release if
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 19 Dec 2006 15:42:10 +0000 (15:42 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 19 Dec 2006 15:42:10 +0000 (15:42 +0000)
there is a selection.

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

src/insets/insetcollapsable.C

index d1e6949a5c875b9c9e7c00c7042c9938cbd1f71c..c12fb7bed9fc5d6d73f94fa3f108ecc0e10ad026 100644 (file)
@@ -356,9 +356,10 @@ void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
                        break;
                }
 
-               if (cmd.button() == mouse_button::button1 && hitButton(cmd)) {
-                       // Left button is clicked, the user asks to toggle the inset
-                       // visual state.
+               if (cmd.button() == mouse_button::button1 && hitButton(cmd)
+                       && !cur.selection()) {
+                       // Left button is clicked, the user asks to
+                       // toggle the inset visual state.
                        cur.dispatched();
                        cur.updateFlags(Update::Force | Update::FitCursor);
                        if (status() == Collapsed) {