sw/source/uibase/utlui/content.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit ccb78b98e0618cce365562fe326d018892b8104a Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Apr 7 08:03:19 2022 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Apr 9 01:35:46 2022 +0200 SwNavigator: set entry focus and update toolbox items sensitivity when content tree entry selection is made by the SelectContentType function The SelectContentType function is used when the Navigate By control combo box selection is changed by direct selection. This patch makes the tree entry cursor position be set to the selected content type entry so keyboard tab navigation will land on it. It also makes the move chapter up/down and promote/demote outline level toolbox items sensitivity update when the selection is made. Change-Id: I56675592678accc6db3eacb25bf9bccae8eb1cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132689 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 3ee581276a76..583f159d2a33 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5074,9 +5074,8 @@ void SwContentTree::SelectContentType(std::u16string_view rContentTypeName) { if (m_xTreeView->get_text(*xIter) == rContentTypeName) { - m_xTreeView->unselect_all(); - m_xTreeView->select(*xIter); - m_xTreeView->scroll_to_row(*xIter); + m_xTreeView->set_cursor(*xIter); + Select(); break; } } while (m_xTreeView->iter_next_sibling(*xIter));