diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-15 15:34:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-15 17:58:26 +0200 |
commit | ada385f1cba427416c1e8517cb6a45b61ceff7b0 (patch) | |
tree | 473ef8ddd0778a048cfa3625e8acd9d9c12e93c5 /sw | |
parent | d77d4a8138861f7f574452f7e4d1673329d54136 (diff) |
navigator pane is grabbing focus away from document when its created
so only grab that focus when its a floating navigator
Change-Id: I52e0840e74c3e8058aee3702df52137dfdd3dc9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92279
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 2a0d30610c26..62cae46965d7 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -582,10 +582,12 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent, m_aStatusArr[3] = SwResId(STR_ACTIVE_VIEW); + bool bFloatingNavigator = SfxChildWindowContext::GetFloatingWindow(GetParent()) != nullptr; + m_xContentTree->set_selection_mode(SelectionMode::Single); m_xContentTree->ShowTree(); m_xContent3ToolBox->set_item_active("listbox", true); - m_xContent3ToolBox->set_item_sensitive("listbox", SfxChildWindowContext::GetFloatingWindow(GetParent()) != nullptr); + m_xContent3ToolBox->set_item_sensitive("listbox", bFloatingNavigator); // TreeListBox for global document m_xGlobalTree->set_selection_mode(SelectionMode::Multiple); @@ -622,9 +624,10 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent, pActView->GetWrtShellPtr()->IsGlblDocSaveLinks()); if (m_pConfig->IsGlobalActive()) ToggleTree(); - m_xGlobalTree->grab_focus(); + if (bFloatingNavigator) + m_xGlobalTree->grab_focus(); } - else + else if (bFloatingNavigator) m_xContentTree->grab_focus(); UsePage(); m_aPageChgIdle.SetInvokeHandler(LINK(this, SwNavigationPI, ChangePageHdl)); |