sw/source/ui/dbui/mmdocselectpage.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 5349b18c17a27b762b92a2c42d40f515fb347895
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Nov 4 12:01:31 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Nov 4 20:15:55 2020 +0100

    don't select entry 0 if there are no entries
    
    Change-Id: I99b13796501dca1551d32eb966db1afcca16e225
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105289
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx 
b/sw/source/ui/dbui/mmdocselectpage.cxx
index 1336a7dc8374..f19089126a03 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -71,11 +71,10 @@ 
SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(weld::Container* pPage, SwMai
         //insert in reverse order
         m_xRecentDocLB->insert_text(0, rDoc);
     }
-    m_xRecentDocLB->set_active(0);
-    if(!rDocs.hasElements())
-    {
+    if (!rDocs.hasElements())
         m_xRecentDocRB->set_sensitive(false);
-    }
+    else
+        m_xRecentDocLB->set_active(0);
 }
 
 SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to