[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 18 09:03:33 UTC 2019


 sw/source/ui/fldui/DropDownFormFieldDialog.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4479eac3ce1a154c538b04165746ba993e981ed9
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Mar 11 10:21:29 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Mar 18 10:03:12 2019 +0100

    MSForms: Fix removal of all items on the drop-down form field dialog
    
    Reviewed-on: https://gerrit.libreoffice.org/69038
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit 31f1789c810970fda7b300b2943f20e10761a5e0)
    
    Change-Id: I37ffbbe48a8b08cc10c83d4bb68946908475776d
    Reviewed-on: https://gerrit.libreoffice.org/69201
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
index 0a80eae05300..5ad97b85978c 100644
--- a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
@@ -68,7 +68,8 @@ IMPL_LINK(DropDownFormFieldDialog, ButtonPushedHdl, Button*, pButton, void)
         if (pButton == m_xListRemoveButton)
         {
             m_xListItemsTreeView->RemoveEntry(nSelPos);
-            m_xListItemsTreeView->SelectEntryPos(nSelPos > 0 ? nSelPos - 1 : 0);
+            if (m_xListItemsTreeView->GetEntryCount() > 0)
+                m_xListItemsTreeView->SelectEntryPos(nSelPos > 0 ? nSelPos - 1 : 0);
         }
         else if (pButton == m_xListUpButton)
         {


More information about the Libreoffice-commits mailing list