Index: applications/editors/josm/plugins/splinex/build.xml
===================================================================
--- applications/editors/josm/plugins/splinex/build.xml	(revision 32309)
+++ applications/editors/josm/plugins/splinex/build.xml	(revision 32500)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9572"/>
+    <property name="plugin.main.version" value="10353"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java
===================================================================
--- applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java	(revision 32309)
+++ applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java	(revision 32500)
@@ -30,6 +30,11 @@
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
 import org.openstreetmap.josm.gui.layer.MapViewPaintable;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -43,5 +48,5 @@
 @SuppressWarnings("serial")
 public class DrawSplineAction extends MapMode implements MapViewPaintable, KeyPressReleaseListener, ModifierListener,
-        LayerChangeListener {
+        LayerChangeListener, ActiveLayerChangeListener {
     private final Cursor cursorJoinNode;
     private final Cursor cursorJoinWay;
@@ -65,5 +70,6 @@
         cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode");
         cursorJoinWay = ImageProvider.getCursor("crosshair", "joinway");
-        MapView.addLayerChangeListener(this);
+        Main.getLayerManager().addLayerChangeListener(this);
+        Main.getLayerManager().addActiveLayerChangeListener(this);
         readPreferences();
     }
@@ -387,5 +393,5 @@
     @Override
     protected void updateEnabledState() {
-        setEnabled(getEditLayer() != null);
+        setEnabled(getLayerManager().getEditLayer() != null);
     }
 
@@ -402,5 +408,5 @@
         if (splCached != null)
             return splCached;
-        Layer l = Main.main.getEditLayer();
+        Layer l = getLayerManager().getEditLayer();
         if (!(l instanceof OsmDataLayer))
             return null;
@@ -413,6 +419,6 @@
 
     @Override
-    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        splCached = layerSplines.get(newLayer);
+    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
+        splCached = layerSplines.get(Main.getLayerManager().getActiveLayer());
     }
 
@@ -420,10 +426,16 @@
 
     @Override
-    public void layerAdded(Layer newLayer) {
-    }
-
-    @Override
-    public void layerRemoved(Layer oldLayer) {
-        layerSplines.remove(oldLayer);
+    public void layerOrderChanged(LayerOrderChangeEvent e) {
+        // Do nothing
+    }
+
+    @Override
+    public void layerAdded(LayerAddEvent e) {
+        // Do nothing
+    }
+
+    @Override
+    public void layerRemoving(LayerRemoveEvent e) {
+        layerSplines.remove(e.getRemovedLayer());
         splCached = null;
     }
@@ -434,6 +446,5 @@
             Spline spl = ph.getSpline();
             if (spl.nodeCount() == 3 && spl.isClosed() && ph.idx == 1)
-                return; // Don't allow to delete node when it results with
-                        // two-node closed spline
+                return; // Don't allow to delete node when it results with two-node closed spline
             Main.main.undoRedo.add(spl.new DeleteSplineNodeCommand(ph.idx));
             e.consume();
@@ -448,6 +459,5 @@
     @Override
     public void doKeyReleased(KeyEvent e) {
-        // TODO Auto-generated method stub
-
+        // Do nothing
     }
 }
