diff --git a/graphview/build.xml b/graphview/build.xml
index b44734a..131ace2 100644
--- a/graphview/build.xml
+++ b/graphview/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <project name="graphview" default="dist" basedir=".">
     <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/>
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10031"/>
 
     <!-- Configure these properties (replace "..." accordingly).
          See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
diff --git a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
index 897caf1..6864d1b 100644
--- a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
+++ b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
@@ -177,7 +177,7 @@ public class GraphViewPlugin extends Plugin implements LayerChangeListener, Obse
     public void repaintGraphViewLayer() {
 
         if (graphViewLayer != null) {
-            Main.panel.repaint();
+            graphViewLayer.invalidate();
         }
 
     }
diff --git a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
index 31cfc10..02bef01 100644
--- a/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
+++ b/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
@@ -45,7 +45,7 @@ import org.openstreetmap.josm.tools.ImageProvider;
 /**
  * layer for displaying the graph visualization
  */
-public class GraphViewLayer extends Layer implements LayerChangeListener, WayGraphObserver {
+public class GraphViewLayer extends Layer implements  WayGraphObserver {
 
     private static final int NODE_RADIUS = 5;
 
@@ -97,7 +97,6 @@ public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
 
     public GraphViewLayer() {
         super("Graph view");
-        MapView.addLayerChangeListener(this);
     }
 
     /** sets the WayGraph that is to be displayed by this layer, may be null */
@@ -114,14 +113,14 @@ public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
     /** sets the ColorScheme that is to be used for choosing colors, may be null */
     public void setColorScheme(ColorScheme colorScheme) {
         this.colorScheme = colorScheme;
-        Main.panel.repaint();
+        invalidate();
     }
 
     /** sets the arrowhead placement (relative offset from edge start) */
     public void setArrowheadPlacement(double arrowheadPlacement) {
     	assert arrowheadPlacement >= 0 && arrowheadPlacement <= 1;
         this.arrowheadPlacement = arrowheadPlacement;
-        Main.panel.repaint();
+        invalidate();
     }
 
     /**
@@ -133,7 +132,7 @@ public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
         if (nodePositioner == null) {
             this.nodePositioner = new NonMovingNodePositioner();
         }
-        Main.panel.repaint();
+        invalidate();
     }
 
     @Override
@@ -407,18 +406,6 @@ public class GraphViewLayer extends Layer implements LayerChangeListener, WayGra
 
     public void update(WayGraph wayGraph) {
         assert wayGraph == this.wayGraph;
-        Main.panel.repaint();
-    }
-
-    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        //do nothing
-    }
-    public void layerAdded(Layer newLayer) {
-        //do nothing
-    }
-    public void layerRemoved(Layer oldLayer) {
-        if (oldLayer == this) {
-            MapView.removeLayerChangeListener(this);
-        }
+        invalidate();
     }
 }
