summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-02-25 15:16:32 -0900
committerJim Raykowski <raykowj@gmail.com>2022-02-28 22:04:01 +0100
commit393e8d622e1ebea0eb2ac59274e7216819b7022b (patch)
tree2f028d79d55a83e5792cea383c20778d8267522c
parent9a810cd97b3d92c7b6ea277fe2e483c223405e88 (diff)
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 <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx13
1 files changed, 7 insertions, 6 deletions
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:
{