[Libreoffice-commits] core.git: sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 19 01:29:19 UTC 2021
sw/source/uibase/utlui/content.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit c4016f246fde835c0cfdabbb7cc35bc6dd48fb24
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sat Jul 10 14:36:05 2021 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Mon Jul 19 03:28:46 2021 +0200
tdf#128814 sw navigator: Make right-click select entry
before context menu is shown
Change-Id: I890efd794aaa88ac6bde6bf41b3976b8c27a3273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118709
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 3fdfb0b01e2d..0c4a23f98d0e 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1468,6 +1468,11 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, rCEvt, bool)
if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
return false;
+ if (std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
+ rCEvt.IsMouseEvent() && m_xTreeView->get_dest_row_at_pos(
+ rCEvt.GetMousePosPixel(), xEntry.get(), false))
+ m_xTreeView->set_cursor(*xEntry);
+
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xTreeView.get(), "modules/swriter/ui/navigatorcontextmenu.ui"));
std::unique_ptr<weld::Menu> xPop = xBuilder->weld_menu("navmenu");
More information about the Libreoffice-commits
mailing list