From 43799f9e21277e655c7ec940d266f775cada837a Mon Sep 17 00:00:00 2001 From: Rishabh Date: Wed, 3 Feb 2016 04:28:48 +0530 Subject: tdf#97407: Remove duplicate custom entry Remove custom entry before updating the spacing listbox Change-Id: I9476e639f4d54e87a2c9049159e6abefb02a9b5e Reviewed-on: https://gerrit.libreoffice.org/21942 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 8ee32d15feeb..41853261a272 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -214,7 +214,8 @@ void WrapPropertyPanel::UpdateSpacingLB() } } - mpSpacingLB->InsertEntry(aCustomEntry); + if(mpSpacingLB->GetEntryPos(aCustomEntry) == LISTBOX_ENTRY_NOTFOUND) + mpSpacingLB->InsertEntry(aCustomEntry); mpSpacingLB->SelectEntry(aCustomEntry); } -- cgit v1.2.3