Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 30737)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 32491)
@@ -121,10 +121,10 @@
     @Override
     public void paint(Graphics2D g, MapView mv, Bounds bbox) {
-        if (pos==null) return;
-        Layer curL= Main.main.getActiveLayer();
-        if (curL instanceof GpxLayer) showLayerInfo(g,curL,mv); else {
-            for (Layer l:mv.getAllLayers()) {
+        if (pos == null) return;
+        Layer curL= mv.getLayerManager().getActiveLayer();
+        if (curL instanceof GpxLayer) showLayerInfo(g, curL, mv); else {
+            for (Layer l : mv.getLayerManager().getLayers()) {
                 if (l instanceof GpxLayer) {
-                    if (showLayerInfo(g,l,mv)) return;
+                    if (showLayerInfo(g, l, mv)) return;
                 }
             }
@@ -220,5 +220,5 @@
 
     private synchronized void filterTracks() {
-        Layer l = Main.main.getActiveLayer();
+        Layer l = getLayerManager().getActiveLayer();
 
         if (l instanceof GpxLayer && pos!=null) {
@@ -235,6 +235,4 @@
             }
             gpxL.data.tracks.removeAll(toRemove);
-
-
         }
     }
