Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 7743)
@@ -18,4 +18,5 @@
 import java.util.regex.Pattern;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -722,4 +723,5 @@
     /**
      * Replies the concatenation of all tag values (concatenated by a semicolon)
+     * @param key the key to look up
      *
      * @return the concatenation of all tag values
@@ -750,4 +752,26 @@
     }
 
+    /**
+     * Replies the sum of all numeric tag values.
+     * @param key the key to look up
+     *
+     * @return the sum of all numeric tag values, as string
+     * @since 7743
+     */
+    public String getSummedValues(String key) {
+        int result = 0;
+        for (String value : getValues(key)) {
+            try {
+                result += Integer.parseInt(value);
+            } catch (NumberFormatException e) {
+                if (Main.isTraceEnabled()) {
+                    Main.trace(e.getMessage());
+                }
+            }
+        }
+        return Integer.toString(result);
+    }
+
+
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 7743)
@@ -40,4 +40,6 @@
     BGCOLOR_TAG_KEEP_ALL (marktr("Conflict background: keep all tags"), new Color(255,234,213)),
     FGCOLOR_TAG_KEEP_ALL (marktr("Conflict foreground: keep all tags"), Color.black),
+    BGCOLOR_TAG_SUM_ALL_NUM(marktr("Conflict background: sum all numeric tags"), new Color(255,234,213)),
+    FGCOLOR_TAG_SUM_ALL_NUM(marktr("Conflict foreground: sum all numeric tags"), Color.black),
 
     BGCOLOR_MEMBER_KEEP  (marktr("Conflict background: keep member"), new Color(217,255,217)),
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 7743)
@@ -22,4 +22,5 @@
 import javax.swing.table.TableCellEditor;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
 
@@ -52,5 +53,9 @@
     private CopyOnWriteArrayList<NavigationListener> listeners;
 
-    public void addNavigationListeners(NavigationListener listener) {
+    /**
+     * Adds a navigation listener.
+     * @param listener navigation listener to add
+     */
+    public void addNavigationListener(NavigationListener listener) {
         if (listener != null) {
             listeners.addIfAbsent(listener);
@@ -58,5 +63,9 @@
     }
 
-    public void removeNavigationListeners(NavigationListener listener) {
+    /**
+     * Removes a navigation listener.
+     * @param listener navigation listener to remove
+     */
+    public void removeNavigationListener(NavigationListener listener) {
         listeners.remove(listener);
     }
@@ -134,4 +143,7 @@
             editorModel.addElement(value);
         }
+        if (decision.canSumAllNumeric()) {
+            editorModel.addElement(MultiValueDecisionType.SUM_ALL_NUMERIC);
+        }
         if (decision.canKeepNone()) {
             editorModel.addElement(MultiValueDecisionType.KEEP_NONE);
@@ -152,4 +164,10 @@
         case KEEP_ALL:
             editor.setSelectedItem(MultiValueDecisionType.KEEP_ALL);
+            break;
+        case SUM_ALL_NUMERIC:
+            editor.setSelectedItem(MultiValueDecisionType.SUM_ALL_NUMERIC);
+            break;
+        default:
+            Main.error("Unknown decision type in initEditor(): "+decision.getDecisionType());
         }
     }
@@ -217,4 +235,8 @@
                     setFont(UIManager.getFont("ComboBox.font").deriveFont(Font.ITALIC + Font.BOLD));
                     break;
+                case SUM_ALL_NUMERIC:
+                    setText(tr("sum"));
+                    setFont(UIManager.getFont("ComboBox.font").deriveFont(Font.ITALIC + Font.BOLD));
+                    break;
                 default:
                     // don't display other values
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 7743)
@@ -66,6 +66,10 @@
                         setBackground(ConflictColors.BGCOLOR_TAG_KEEP_ALL.get());
                         break;
+                    case SUM_ALL_NUMERIC:
+                        setForeground(ConflictColors.FGCOLOR_TAG_SUM_ALL_NUM.get());
+                        setBackground(ConflictColors.BGCOLOR_TAG_SUM_ALL_NUM.get());
+                        break;
                     default:
-                        Main.error("Unknown decision type: "+decision.getDecisionType());
+                        Main.error("Unknown decision type in renderColors(): "+decision.getDecisionType());
                     }
                 } else {
@@ -86,9 +90,4 @@
             cbDecisionRenderer.setSelectedIndex(0);
             break;
-        case KEEP_ONE:
-            model.addElement(decision.getChosenValue());
-            cbDecisionRenderer.setFont(getFont());
-            cbDecisionRenderer.setSelectedIndex(0);
-            break;
         case KEEP_NONE:
             model.addElement(tr("deleted"));
@@ -96,9 +95,13 @@
             cbDecisionRenderer.setSelectedIndex(0);
             break;
+        case KEEP_ONE:
         case KEEP_ALL:
+        case SUM_ALL_NUMERIC:
             model.addElement(decision.getChosenValue());
             cbDecisionRenderer.setFont(getFont());
             cbDecisionRenderer.setSelectedIndex(0);
             break;
+        default:
+            Main.error("Unknown decision type in renderValue(): "+decision.getDecisionType());
         }
     }
@@ -108,27 +111,24 @@
      */
     protected void renderToolTipText(MultiValueResolutionDecision decision) {
-        String toolTipText;
+        String toolTipText = null;
         switch (decision.getDecisionType()) {
         case UNDECIDED:
             toolTipText = tr("Please decide which values to keep");
-            setToolTipText(toolTipText);
-            cbDecisionRenderer.setToolTipText(toolTipText);
             break;
         case KEEP_ONE:
             toolTipText = tr("Value ''{0}'' is going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
-            setToolTipText(toolTipText);
-            cbDecisionRenderer.setToolTipText(toolTipText);
+            break;
+        case SUM_ALL_NUMERIC:
+            toolTipText = tr("All numeric values sumed as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
             break;
         case KEEP_NONE:
             toolTipText = tr("The key ''{0}'' and all its values are going to be removed", decision.getKey());
-            setToolTipText(toolTipText);
-            cbDecisionRenderer.setToolTipText(toolTipText);
             break;
         case KEEP_ALL:
             toolTipText = tr("All values joined as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
-            setToolTipText(toolTipText);
-            cbDecisionRenderer.setToolTipText(toolTipText);
             break;
         }
+        setToolTipText(toolTipText);
+        cbDecisionRenderer.setToolTipText(toolTipText);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueDecisionType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueDecisionType.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueDecisionType.java	(revision 7743)
@@ -4,6 +4,5 @@
 /**
  * Represents a decision for a tag conflict due to multiple possible values.
- *
- *
+ * @since 2008
  */
 public enum MultiValueDecisionType {
@@ -12,4 +11,6 @@
     /** keep exactly one values */
     KEEP_ONE,
+    /** sum all numeric values; only available for a few keys (eg: capacity) */
+    SUM_ALL_NUMERIC,
     /** keep no value, delete the tag */
     KEEP_NONE,
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 7743)
@@ -16,8 +16,8 @@
 import org.openstreetmap.josm.data.osm.TagCollection;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+
 /**
  * Represents a decision for a conflict due to multiple possible value for a tag.
- *
- *
+ * @since 2008
  */
 public class MultiValueResolutionDecision {
@@ -26,5 +26,5 @@
     private MultiValueDecisionType type;
     /** the collection of tags for which a decision is needed */
-    private TagCollection  tags;
+    private TagCollection tags;
     /** the selected value if {@link #type} is {@link MultiValueDecisionType#KEEP_ONE} */
     private String value;
@@ -89,4 +89,12 @@
 
     /**
+     * Apply the decision to sum all numeric values
+     * @since 7743
+     */
+    public void sumAllNumeric() {
+        this.type = MultiValueDecisionType.SUM_ALL_NUMERIC;
+    }
+
+    /**
      * Apply the decision to keep exactly one value
      *
@@ -135,9 +143,9 @@
         case UNDECIDED: throw new IllegalStateException(tr("Not decided yet."));
         case KEEP_ONE: return value;
+        case SUM_ALL_NUMERIC: return tags.getSummedValues(getKey());
         case KEEP_NONE: return null;
         case KEEP_ALL: return tags.getJoinedValues(getKey());
-        }
-        // should not happen
-        return null;
+        default: return null;
+        }
     }
 
@@ -180,4 +188,14 @@
     public boolean canKeepAll() {
         return getValues().size() > 1;
+    }
+
+    /**
+     * Replies true, if summing all numeric values is a possible value in this resolution
+     *
+     * @return true, if summing all numeric values is a possible value in this resolution
+     * @since 7743
+     */
+    public boolean canSumAllNumeric() {
+        return "capacity".equals(getKey()) && canKeepAll();
     }
 
@@ -275,10 +293,11 @@
     public Tag getResolution() {
         switch(type) {
+        case SUM_ALL_NUMERIC: return new Tag(getKey(), tags.getSummedValues(getKey()));
         case KEEP_ALL: return new Tag(getKey(), tags.getJoinedValues(getKey()));
         case KEEP_ONE: return new Tag(getKey(),value);
         case KEEP_NONE: return new Tag(getKey(), "");
         case UNDECIDED: return null;
-        }
-        return null;
+        default: return null;
+        }
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 7743)
@@ -178,4 +178,7 @@
                 decision.keepAll();
                 break;
+            case SUM_ALL_NUMERIC:
+                decision.sumAllNumeric();
+                break;
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java	(revision 7742)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java	(revision 7743)
@@ -40,5 +40,5 @@
         getActionMap().put("selectPreviousColumnCell", selectPreviousColumnCellAction);
 
-        ((MultiValueCellEditor)getColumnModel().getColumn(2).getCellEditor()).addNavigationListeners(this);
+        ((MultiValueCellEditor)getColumnModel().getColumn(2).getCellEditor()).addNavigationListener(this);
 
         setRowHeight((int)new JosmComboBox<String>().getPreferredSize().getHeight());
