sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 15 +++------- 1 file changed, 5 insertions(+), 10 deletions(-)
New commits: commit 5b9c9ad69d58d04ae9f29deab894f5a1846cbd63 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Nov 3 16:24:14 2017 +0000 Resolves: rtl: tdf#60315 slide pane context menu misplaced so use same (slighty crazed) logic as DrawViewShell::Command to get the right place when rtl is enabled Change-Id: Icb4a39310ab98bd186cbafd516ca5f323da8cce1 Reviewed-on: https://gerrit.libreoffice.org/44275 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index dfd07f3de532..a5b2411a9caa 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -356,15 +356,7 @@ bool SlideSorterController::Command ( pWindow->ReleaseMouse(); Point aMenuLocation (0,0); - if (rEvent.IsMouseEvent()) - { - // We have to explicitly specify the location of the menu - // when the slide sorter is placed in an undocked child - // menu. But when it is docked it does not hurt, so we - // specify the location always. - aMenuLocation = rEvent.GetMousePosPixel(); - } - else + if (!rEvent.IsMouseEvent()) { // The event is not a mouse event. Use the center of the // focused page as top left position of the context menu. @@ -388,7 +380,10 @@ bool SlideSorterController::Command ( if (pDispatcher != nullptr) { mbContextMenuOpen = true; - pDispatcher->ExecutePopup( aPopupId, pWindow, &aMenuLocation ); + if (!rEvent.IsMouseEvent()) + pDispatcher->ExecutePopup(aPopupId, pWindow, &aMenuLocation); + else + pDispatcher->ExecutePopup(aPopupId); mbContextMenuOpen = false; mrSlideSorter.GetView().UpdatePageUnderMouse(); ::rtl::Reference<SelectionFunction> pFunction(GetCurrentSelectionFunction());
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits