From ad7c658b2baa6bf01b91a14055624cc10cb0d244 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Mon, 24 Feb 2020 13:39:27 -0700 Subject: [PATCH] Don't add cycle layer actions when on JOSM r15923+ Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/MapWithAIPlugin.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPlugin.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPlugin.java index d1ad790..2382fd0 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPlugin.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPlugin.java @@ -17,6 +17,7 @@ import javax.swing.JMenu; import javax.swing.JMenuItem; import org.openstreetmap.josm.actions.JosmAction; +import org.openstreetmap.josm.data.Version; import org.openstreetmap.josm.data.validation.OsmValidator; import org.openstreetmap.josm.data.validation.Test; import org.openstreetmap.josm.gui.MainApplication; @@ -107,8 +108,10 @@ public final class MapWithAIPlugin extends Plugin implements Destroyable { new MapWithAIRemoteControl(); // instantiate to get action into Remote Control Preferences destroyables = new ArrayList<>(); destroyables.add(new MapWithAIUploadHook(info)); - destroyables.add(new CycleLayerDownAction()); // TODO remove/put in if block when JOSM-18638 is fixed - destroyables.add(new CycleLayerUpAction()); // TODO see above + if (Version.getInstance().getVersion() < 15923) { + destroyables.add(new CycleLayerDownAction()); // TODO remove/put in if block when JOSM-18638 is fixed + destroyables.add(new CycleLayerUpAction()); // TODO see above + } mapFrameInitialized(null, MainApplication.getMap()); mapWithAIDownloadReader = new MapWithAIDownloadReader(); DownloadDialog.addDownloadSource(mapWithAIDownloadReader);