diff options
author | Jim Raykowski <raykowj@gmail.com> | 2021-08-06 20:22:20 -0800 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-09 15:25:52 +0200 |
commit | ef5bbe7a52baded54e8e6351431f2e04ef2b6828 (patch) | |
tree | cab72d7f93d574343321b784be1f544586f03fd8 /sd | |
parent | 8fdbb8aed1b48734a717d5f98ada566de7204605 (diff) |
tdf#138960 Check if tree entry has children before attempting to expand
or collapse
Change-Id: Icbfc50dda35bb6027c12a42b5e8f79da165888e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120129
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
(cherry picked from commit 12dd1ce1dddc4ebad6be94ddec167cc7f6c45fe3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120142
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 4494cf35419a..9d4d00eb07b1 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -307,7 +307,7 @@ IMPL_LINK(SdPageObjsTLV, KeyInputHdl, const KeyEvent&, rKEvt, bool) if (rKeyCode.GetCode() == KEY_RETURN) { std::unique_ptr<weld::TreeIter> xCursor(m_xTreeView->make_iterator()); - if (m_xTreeView->get_cursor(xCursor.get())) + if (m_xTreeView->get_cursor(xCursor.get()) && m_xTreeView->iter_has_child(*xCursor)) { if (m_xTreeView->get_row_expanded(*xCursor)) m_xTreeView->collapse_row(*xCursor); |