Index: applications/editors/josm/plugins/relcontext/TODO
===================================================================
--- applications/editors/josm/plugins/relcontext/TODO	(revision 25692)
+++ applications/editors/josm/plugins/relcontext/TODO	(revision 25693)
@@ -1,3 +1,2 @@
-- After creating multipolygon, move tags from outer to relation (setting "tags")
 - Solve width problem for narrows buttons when "fix" and "download" appear simultaneously
 - Check all strings to be properly formulated, search for similar ones in josm core and plugins
Index: applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java
===================================================================
--- applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java	(revision 25692)
+++ applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java	(revision 25693)
@@ -1,4 +1,6 @@
 package relcontext;
 
+import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.command.Command;
 import java.io.IOException;
 import java.io.BufferedReader;
@@ -45,4 +47,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.command.ChangeCommand;
+import org.openstreetmap.josm.command.ChangeRelationMemberRoleCommand;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;
@@ -514,16 +517,15 @@
             Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected();
             Relation r = new Relation(chosenRelation.get());
-            boolean fixed = false;
+            List<Command> commands = new ArrayList<Command>();
             for( int i = 0; i < r.getMembersCount(); i++ ) {
                 RelationMember m = r.getMember(i);
                 if( selected.contains(m.getMember()) ) {
                     if( !role.equals(m.getRole()) ) {
-                        r.setMember(i, new RelationMember(role, m.getMember()));
-                        fixed = true;
+                        commands.add(new ChangeRelationMemberRoleCommand(r, i, role));
                     }
                 }
             }
-            if( fixed )
-                Main.main.undoRedo.add(new ChangeCommand(chosenRelation.get(), r));
+            if( !commands.isEmpty() )
+                Main.main.undoRedo.add(new SequenceCommand(tr("Change relation member roles to {0}", role), commands));
         }
     }
@@ -591,5 +593,5 @@
             addMenuItem("boundary", "Create administrative boundary relations");
             addMenuItem("boundaryways", "Add tags boundary and admin_level to boundary relation ways");
-            addMenuItem("tags", "Move area tags from contour to relation").setEnabled(false);
+            addMenuItem("tags", "Move area tags from contour to relation");
             addMenuItem("single", "Create a single multipolygon for multiple outer contours").setEnabled(false);
         }
Index: applications/editors/josm/plugins/relcontext/src/relcontext/actions/CreateMultipolygonAction.java
===================================================================
--- applications/editors/josm/plugins/relcontext/src/relcontext/actions/CreateMultipolygonAction.java	(revision 25692)
+++ applications/editors/josm/plugins/relcontext/src/relcontext/actions/CreateMultipolygonAction.java	(revision 25693)
@@ -178,4 +178,6 @@
     }
 
+    static public final String[] DEFAULT_LINEAR_TAGS = {"barrier", "source"};
+
     /**
      * This method removes tags/value pairs from inner ways that are present in relation or outer ways.
@@ -193,4 +195,6 @@
 
         List<Way> innerWays = new ArrayList<Way>();
+        List<Way> outerWays = new ArrayList<Way>();
+        Set<String> conflictingKeys = new TreeSet<String>();
 
         for (RelationMember m: relation.getMembers()) {
@@ -202,7 +206,10 @@
             if (m.hasRole() && m.getRole() == "outer" && m.isWay() && m.getWay().hasKeys()) {
                 Way way = m.getWay();
+                outerWays.add(way);
                 for (String key: way.keySet()) {
                     if (!values.containsKey(key)) { //relation values take precedence
                         values.put(key, way.get(key));
+                    } else if( !relation.hasKey(key) && !values.get(key).equals(way.get(key)) ) {
+                        conflictingKeys.add(key);
                     }
                 }
@@ -210,5 +217,24 @@
         }
 
+        // filter out empty key conflicts - we need second iteration
+        for( RelationMember m: relation.getMembers() )
+            if( m.hasRole() && m.getRole().equals("outer") && m.isWay() )
+                for( String key : values.keySet() )
+                    if( !m.getWay().hasKey(key) && !relation.hasKey(key) )
+                        conflictingKeys.add(key);
+
+        for( String key : conflictingKeys )
+            values.remove(key);
+
+        for( String linearTag : Main.pref.getCollection(PREF_MULTIPOLY + "lineartags", Arrays.asList(DEFAULT_LINEAR_TAGS)))
+            values.remove(linearTag);
+
+        if( values.containsKey("natural") && values.get("natural").equals("coastline") )
+            values.remove("natural");
+
+        values.put("area", "yes");
+
         List<Command> commands = new ArrayList<Command>();
+        boolean moveTags = getPref("tags");
 
         for(String key: values.keySet()) {
@@ -222,7 +248,30 @@
             }
 
+            if( moveTags ) {
+                // remove duplicated tags from outer ways
+                for (Way way: outerWays) {
+                    if (way.hasKey(key)) {
+                        affectedWays.add(way);
+                    }
+                }
+            }
+
             if (affectedWays.size() > 0) {
                 commands.add(new ChangePropertyCommand(affectedWays, key, null));
             }
+        }
+
+        if( moveTags ) {
+            // add those tag values to the relation
+            boolean fixed = false;
+            Relation r2 = new Relation(relation);
+            for( String key : values.keySet() ) {
+                if( !r2.hasKey(key) && !key.equals("area") ) {
+                    r2.put(key, values.get(key));
+                    fixed = true;
+                }
+            }
+            if( fixed )
+                commands.add(new ChangeCommand(relation, r2));
         }
 
