[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sd/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 9 13:26:27 UTC 2021
sd/source/ui/dlg/sdtreelb.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ef5bbe7a52baded54e8e6351431f2e04ef2b6828
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Fri Aug 6 20:22:20 2021 -0800
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Aug 9 15:25:52 2021 +0200
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 at gmail.com>
(cherry picked from commit 12dd1ce1dddc4ebad6be94ddec167cc7f6c45fe3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120142
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
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);
More information about the Libreoffice-commits
mailing list