From 4439f6144f53f2d9beaa2ceffda861838fd39e86 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 29 Nov 2010 15:19:20 +0000 Subject: [PATCH] Fix bug #6768: inset-toggle points cursor after inset 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 949bab70dc..4fb0b2cc8c 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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(); -- 2.39.2