vcl/source/treelist/svimpbox.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 93c17f16b064ded262b23eb8aa60ff58bda18bc7
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Aug 19 12:50:23 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 19 15:03:11 2024 +0200

    tdf#150461: deselect all when clicking outside of all list items
    
    Change-Id: I72185ccee716825b5e7b1bb7ae6bddb533604f53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171988
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 34dfd537a50b..3008488b5d4f 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -1938,7 +1938,11 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt 
)
     SvTreeListEntry* pEntry = GetEntry(aPos);
     // the entry can still be invalid!
     if( !pEntry || !m_pView->GetViewData( pEntry ))
+    {
+        if (!rMEvt.GetModifier() && rMEvt.IsLeft())
+            SelAllDestrAnch(false); // deselect all
         return;
+    }
 
     tools::Long nY = GetEntryLine( pEntry );
     // Node-Button?

Reply via email to