Index: /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 14649)
+++ /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 14650)
@@ -37,5 +37,5 @@
 import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.gui.dialogs.PropertiesMembershipChoiceDialog;
-import org.openstreetmap.josm.gui.dialogs.PropertiesMembershipChoiceDialog.ExistingBothNewChoice;
+import org.openstreetmap.josm.gui.dialogs.PropertiesMembershipChoiceDialog.ExistingBothNew;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -180,10 +180,10 @@
     }
 
-    private static void updateProperties(ExistingBothNewChoice tags, Node existingNode, Iterable<Node> newNodes, Collection<Command> cmds) {
-        if (tags != null && tags.newNode.isSelected()) {
+    private static void updateProperties(ExistingBothNew tags, Node existingNode, Iterable<Node> newNodes, Collection<Command> cmds) {
+        if (ExistingBothNew.NEW.equals(tags)) {
             final Node newSelectedNode = new Node(existingNode);
             newSelectedNode.removeAll();
             cmds.add(new ChangeCommand(existingNode, newSelectedNode));
-        } else if (tags != null && tags.oldNode.isSelected()) {
+        } else if (ExistingBothNew.OLD.equals(tags)) {
             for (Node newNode : newNodes) {
                 newNode.removeAll();
@@ -192,8 +192,8 @@
     }
 
-    private static void updateMemberships(ExistingBothNewChoice memberships, Node existingNode, List<Node> newNodes, Collection<Command> cmds) {
-        if (memberships != null && memberships.bothNodes.isSelected()) {
+    private static void updateMemberships(ExistingBothNew memberships, Node existingNode, List<Node> newNodes, Collection<Command> cmds) {
+        if (ExistingBothNew.BOTH.equals(memberships)) {
             fixRelations(existingNode, cmds, newNodes, false);
-        } else if (memberships != null && memberships.newNode.isSelected()) {
+        } else if (ExistingBothNew.NEW.equals(memberships)) {
             fixRelations(existingNode, cmds, newNodes, true);
         }
@@ -203,5 +203,5 @@
      * Assumes there is one tagged Node stored in selectedNode that it will try to unglue.
      * (i.e. copy node and remove all tags from the old one. Relations will not be removed)
-     * @param e event that trigerred the action
+     * @param e event that triggered the action
      */
     private void unglueOneNodeAtMostOneWay(ActionEvent e) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesMembershipChoiceDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesMembershipChoiceDialog.java	(revision 14649)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesMembershipChoiceDialog.java	(revision 14650)
@@ -31,14 +31,18 @@
     private final transient ExistingBothNewChoice memberships;
 
+    public enum ExistingBothNew {
+        OLD, BOTH, NEW
+    }
+
     /**
      * Provides toggle buttons to allow the user choose the existing node, the new nodes, or all of them.
      */
-    public static class ExistingBothNewChoice {
+    private static class ExistingBothNewChoice {
         /** The "Existing node" button */
-        public final AbstractButton oldNode = new JToggleButton(tr("Existing node"), ImageProvider.get("dialogs/conflict/tagkeeptheir"));
+        final AbstractButton oldNode = new JToggleButton(tr("Existing node"), ImageProvider.get("dialogs/conflict/tagkeeptheir"));
         /** The "Both nodes" button */
-        public final AbstractButton bothNodes = new JToggleButton(tr("Both nodes"), ImageProvider.get("dialogs/conflict/tagundecide"));
+        final AbstractButton bothNodes = new JToggleButton(tr("Both nodes"), ImageProvider.get("dialogs/conflict/tagundecide"));
         /** The "New node" button */
-        public final AbstractButton newNode = new JToggleButton(tr("New node"), ImageProvider.get("dialogs/conflict/tagkeepmine"));
+        final AbstractButton newNode = new JToggleButton(tr("New node"), ImageProvider.get("dialogs/conflict/tagkeepmine"));
 
         ExistingBothNewChoice(final boolean preselectNew) {
@@ -48,4 +52,22 @@
             tagsGroup.add(newNode);
             tagsGroup.setSelected((preselectNew ? newNode : oldNode).getModel(), true);
+        }
+
+        void add(JPanel content, int gridy) {
+            content.add(oldNode, GBC.std(1, gridy));
+            content.add(bothNodes, GBC.std(2, gridy));
+            content.add(newNode, GBC.std(3, gridy));
+        }
+
+        ExistingBothNew getSelected() {
+            if (oldNode.isSelected()) {
+                return ExistingBothNew.OLD;
+            } else if (bothNodes.isEnabled()) {
+                return ExistingBothNew.BOTH;
+            } else if (newNode.isSelected()) {
+                return ExistingBothNew.NEW;
+            } else {
+                throw new IllegalStateException();
+            }
         }
     }
@@ -60,7 +82,5 @@
             content.add(new JLabel(tr("Where should the tags of the node be put?")), GBC.std(1, 1).span(3).insets(0, 20, 0, 0));
             tags = new ExistingBothNewChoice(preselectNew);
-            content.add(tags.oldNode, GBC.std(1, 2));
-            content.add(tags.bothNodes, GBC.std(2, 2));
-            content.add(tags.newNode, GBC.std(3, 2));
+            tags.add(content, 2);
         } else {
             tags = null;
@@ -70,7 +90,5 @@
             content.add(new JLabel(tr("Where should the memberships of this node be put?")), GBC.std(1, 3).span(3).insets(0, 20, 0, 0));
             memberships = new ExistingBothNewChoice(preselectNew);
-            content.add(memberships.oldNode, GBC.std(1, 4));
-            content.add(memberships.bothNodes, GBC.std(2, 4));
-            content.add(memberships.newNode, GBC.std(3, 4));
+            memberships.add(content, 4);
         } else {
             memberships = null;
@@ -85,6 +103,6 @@
      * @return the tags choice (can be null)
      */
-    public ExistingBothNewChoice getTags() {
-        return tags;
+    public ExistingBothNew getTags() {
+        return tags.getSelected();
     }
 
@@ -93,6 +111,6 @@
      * @return the memberships choice (can be null)
      */
-    public ExistingBothNewChoice getMemberships() {
-        return memberships;
+    public ExistingBothNew getMemberships() {
+        return memberships.getSelected();
     }
 
