]> git.lyx.org Git - features.git/commitdiff
* BufferView.cpp (contextMenu): If there is a selection, return the
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 14 Aug 2008 09:45:42 +0000 (09:45 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 14 Aug 2008 09:45:42 +0000 (09:45 +0000)
containing inset menu

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

src/BufferView.cpp

index b46be350b850010964b3c6322381b7dd86cda0ba..90537af888f2b6fcfb3223289ece4b8955498ed4 100644 (file)
@@ -533,6 +533,10 @@ docstring BufferView::toolTip(int x, int y) const
 
 docstring BufferView::contextMenu(int x, int y) const
 {
+       //If there is a selection, return the containing inset menu
+       if (d->cursor_.selection())
+               return d->cursor_.inset().contextMenu(*this, x, y);
+
        // Get inset under mouse, if there is one.
        Inset const * covering_inset = getCoveringInset(buffer_.text(), x, y);
        if (covering_inset)