]> git.lyx.org Git - features.git/commitdiff
Fix regression of 359aef92f87
authorGeorg Baum <baum@lyx.org>
Tue, 15 Mar 2016 20:35:50 +0000 (21:35 +0100)
committerGeorg Baum <baum@lyx.org>
Tue, 15 Mar 2016 20:35:50 +0000 (21:35 +0100)
The context menu of newline insets was completely greyed out if one clicked
at the right of the inset. Thanks Scott for finding this. The fix is to undo
the cursor movement also for insets without settings, but with a context menu.

src/BufferView.cpp

index 81ebe79977370d21bf2e54341cd2ab5d400dc955..8783d47910e353e00f3b557c6a3035ae7a68245c 100644 (file)
@@ -2203,7 +2203,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
                // inset (depending on cmd.x(), cmd.y()). This is needed for
                // editing to fix bug 9628, but e.g. the context menu needs a
                // cursor in front of the inset.
-               if (inset->hasSettings() &&
+               if ((inset->hasSettings() || !inset->contextMenuName().empty()) &&
                    cur.nextInset() != inset && cur.prevInset() == inset)
                        cur.posBackward();
        }