From 1b2c73c555ca09a0e9cd56c8132e15d3aa4b7d01 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 14 Aug 2008 09:45:42 +0000 Subject: [PATCH] * BufferView.cpp (contextMenu): If there is a selection, return the containing inset menu git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26157 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index b46be350b8..90537af888 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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) -- 2.39.2