Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java	(revision 30145)
@@ -243,5 +243,5 @@
                     Relation relation = (Relation)relationsData.getValueAt(row, 0);
                     if( e.getClickCount() > 1 ) {
-                        Main.map.mapView.getEditLayer().data.setSelected(relation);
+                        Main.main.getEditLayer().data.setSelected(relation);
                     }
                 }
@@ -487,6 +487,6 @@
         public void mouseClicked( MouseEvent e ) {
             if( e.isControlDown() || !(e.getComponent() instanceof JComboBox ) ) // do not use left click handler on combo box
-            if( SwingUtilities.isLeftMouseButton(e) && chosenRelation.get() != null && Main.map.mapView.getEditLayer() != null ) {
-                Main.map.mapView.getEditLayer().data.setSelected(chosenRelation.get());
+            if( SwingUtilities.isLeftMouseButton(e) && chosenRelation.get() != null && Main.main.getEditLayer() != null ) {
+                Main.main.getEditLayer().data.setSelected(chosenRelation.get());
             }
         }
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java	(revision 30145)
@@ -62,5 +62,5 @@
     protected void downloadMembers( Relation rel ) {
         if( !rel.isNew() ) {
-            Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.map.mapView.getEditLayer()));
+            Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.main.getEditLayer()));
         }
     }
@@ -71,5 +71,5 @@
         ret.addAll(rel.getIncompleteMembers());
         if( ret.isEmpty() ) return;
-        Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.map.mapView.getEditLayer()));
+        Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.main.getEditLayer()));
     }
 }
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java	(revision 30145)
@@ -37,5 +37,5 @@
         this.rel = rel;
         rel.addChosenRelationListener(this);
-        setEnabled(rel.get() != null && Main.map.mapView.getEditLayer() != null);
+        setEnabled(rel.get() != null && Main.main.getEditLayer() != null);
     }
 
@@ -46,14 +46,14 @@
         objects.add(relation);
         objects.addAll(relation.getMemberPrimitives());
-        Main.worker.submit(new DownloadReferrersTask(Main.map.mapView.getEditLayer(), objects));
+        Main.worker.submit(new DownloadReferrersTask(Main.main.getEditLayer(), objects));
     }
 
     public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) {
-        setEnabled(newRelation != null && Main.map.mapView.getEditLayer() != null);
+        setEnabled(newRelation != null && Main.main.getEditLayer() != null);
     }
 
     protected void downloadMembers( Relation rel ) {
         if( !rel.isNew() ) {
-            Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.map.mapView.getEditLayer()));
+            Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.main.getEditLayer()));
         }
     }
@@ -64,5 +64,5 @@
         ret.addAll(rel.getIncompleteMembers());
         if( ret.isEmpty() ) return;
-        Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.map.mapView.getEditLayer()));
+        Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.main.getEditLayer()));
     }
 }
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/EditChosenRelationAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/EditChosenRelationAction.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/EditChosenRelationAction.java	(revision 30145)
@@ -32,5 +32,5 @@
         Relation relation = rel.get();
         if( relation == null ) return;
-        RelationEditor.getEditor(Main.map.mapView.getEditLayer(), relation, null).setVisible(true);
+        RelationEditor.getEditor(Main.main.getEditLayer(), relation, null).setVisible(true);
     }
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectMembersAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectMembersAction.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectMembersAction.java	(revision 30145)
@@ -22,5 +22,5 @@
 
     public void actionPerformed( ActionEvent e ) {
-        Main.map.mapView.getEditLayer().data.setSelected(rel.get() == null ? null : rel.get().getMemberPrimitives());
+        Main.main.getEditLayer().data.setSelected(rel.get() == null ? null : rel.get().getMemberPrimitives());
     }
 
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectRelationAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectRelationAction.java	(revision 29854)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SelectRelationAction.java	(revision 30145)
@@ -23,5 +23,5 @@
 
     public void actionPerformed( ActionEvent e ) {
-        Main.map.mapView.getEditLayer().data.setSelected(rel.get() == null ? null : rel.get());
+        Main.main.getEditLayer().data.setSelected(rel.get() == null ? null : rel.get());
     }
 
