[Libreoffice-commits] core.git: sd/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 8 19:25:45 UTC 2021


 sd/source/ui/dlg/sdtreelb.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12dd1ce1dddc4ebad6be94ddec167cc7f6c45fe3
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Fri Aug 6 20:22:20 2021 -0800
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Sun Aug 8 21:25:11 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>

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index f146b30b6a80..6768fc2fe30b 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