]> git.lyx.org Git - features.git/commitdiff
Fix bug #6768: inset-toggle points cursor after inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Nov 2010 15:19:20 +0000 (15:19 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 29 Nov 2010 15:19:20 +0000 (15:19 +0000)
Strangely enough, the code to go after the inset is here explicitely (so somebody thought at some time that it was a good idea. However, it is not active in 1.6.x...

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

src/insets/InsetCollapsable.cpp

index 949bab70dc51d237a933fd4a2f25d0923b34e608..4fb0b2cc8ca20165c0be29389583d123491e5ef9 100644 (file)
@@ -537,11 +537,9 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
                else if (cmd.argument() == "close")
                        setStatus(cur, Collapsed);
                else if (cmd.argument() == "toggle" || cmd.argument().empty())
-                       if (status_ == Open) {
+                       if (status_ == Open)
                                setStatus(cur, Collapsed);
-                               if (geometry(cur.bv()) == ButtonOnly)
-                                       cur.top().forwardPos();
-                       } else
+                       else
                                setStatus(cur, Open);
                else // if assign or anything else
                        cur.undispatched();