vcl/source/treelist/svimpbox.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit eef94d7b4360e17ba21577fe52bd60214bd5280c
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Thu Dec 15 21:23:49 2022 -0900
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Sat Dec 17 05:07:19 2022 +0000

    tdf#152517 Fix gen backend treeview ctrl+minus behavior
    
    For gen type backends, makes the cursor node and all sub nodes
    collapsed on ctrl+minus key input.
    
    Change-Id: I53730aca29dd47766cfe8b4cdc81539633ebd8c9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144286
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 63b4d928bfd5..b5efa69aa19d 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -2392,9 +2392,12 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
         case KEY_SUBTRACT:
             if (m_pView->IsExpanded(m_pCursor))
-                m_pView->Collapse(m_pCursor);
-            if (bMod1)
-                CollapseTo(m_pTree->GetRootLevelParent(m_pCursor));
+            {
+                if (bMod1)
+                    CollapseTo(m_pCursor);
+                else
+                    m_pView->Collapse(m_pCursor);
+            }
             break;
 
         case KEY_MULTIPLY:

Reply via email to