sw/source/uibase/utlui/content.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit 393e8d622e1ebea0eb2ac59274e7216819b7022b Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Fri Feb 25 15:16:32 2022 -0900 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Mon Feb 28 22:04:01 2022 +0100 SwNavigator: fix cursor positioning on comment context menu 'Edit...' Makes the cursor end up in the selected comment annotation window instead of at the comment anchor position in the document when a comment annotation window has the cursor focus and the Comment context menu item 'Edit...' is selected. Change-Id: Iac87177670a1b74525dd03ecce05135c4b89d692 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130572 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 963ab9efe9db..7fa9c9fa5fb2 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4679,16 +4679,17 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode) [[fallthrough]]; // execute FN_POSTIT assuring standard mode first } case ContentTypeId::POSTIT: - m_pActiveShell->GetView().GetPostItMgr()->AssureStdModeAtShell(); + { + auto& rView = m_pActiveShell->GetView(); + auto pPostItMgr = rView.GetPostItMgr(); + pPostItMgr->AssureStdModeAtShell(); + pPostItMgr->SetActiveSidebarWin(nullptr); + rView.GetEditWin().GrabFocus(); if(nMode == EditEntryMode::DELETE) - { - m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr); m_pActiveShell->DelRight(); - } else - { nSlot = FN_POSTIT; - } + } break; case ContentTypeId::INDEX: {