diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java index d3599018..ecabe1f6 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java @@ -213,8 +213,11 @@ public void loadDefaults(boolean clearCache, ForkJoinPool worker, boolean fastFa if (this.finishListenerListenerList == null) { this.finishListenerListenerList = ListenerList.create(); } + boolean running = this.finishListenerListenerList.hasListeners(); if (listener != null) { this.finishListenerListenerList.addListener(listener); + } + if (running) { return; } if (worker == null) {