summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/navigatr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg/navigatr.cxx')
-rw-r--r--sd/source/ui/dlg/navigatr.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 7423a8425eeb..af0e37e36d3a 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -303,12 +303,18 @@ IMPL_LINK(SdNavigatorWin, CommandHdl, const CommandEvent&, rCEvt, bool)
void SdNavigatorWin::ExecuteContextMenuAction(std::u16string_view rSelectedPopupEntry)
{
- if (rSelectedPopupEntry == u"rename" && mpBindings)
+ if (rSelectedPopupEntry == u"rename")
{
weld::TreeView& rTreeView = GetObjects().get_treeview();
std::unique_ptr<weld::TreeIter> xIter(rTreeView.make_iterator());
if (rTreeView.get_selected(xIter.get()))
{
+ // grab the shell focus so the navigator will update
+ if (SfxViewShell* pCurSh = SfxViewShell::Current())
+ {
+ if (vcl::Window* pShellWnd = pCurSh->GetWindow())
+ pShellWnd->GrabFocus();
+ }
if (rTreeView.get_iter_depth(*xIter) > 0)
mpBindings->Execute(SID_NAME_GROUP);
else