From faa031e49c746187febc3fe6f52ed6a5961cd30a Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Tue, 16 Jan 2024 14:45:40 -0700 Subject: [PATCH] Fix issue where the sources would not be updated Signed-off-by: Taylor Smock --- .../plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java | 3 +++ 1 file changed, 3 insertions(+) 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 d359901..ecabe1f 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 class MapWithAILayerInfo { 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) {