diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index e82cbac827..063491f884 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java @@ -122,11 +122,12 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li protected void populateNameObjects(Widget widget) { ArrayList nameObjectList = new ArrayList<>(); - for (int i = 0, j = 0, size = widget.getListenerSize(); i < size; i++) { + for (int i = 0, size = widget.getListenerSize(); i < size; i++) { Listener listener = widget.getListener(i); if (!listener.isDefault()) { - nameObjectList.add(j, new NameObject(switchLang(listener.getEventName()) + (j + 1), listener)); - j++; + String eventName = switchLang(listener.getEventName()) + (nameObjectList.size() + 1); + NameObject nameObject = new NameObject(eventName, listener); + nameObjectList.add(nameObject); } } populate(getHelper().processCatalog(nameObjectList));