Ticket #19792: 19792.2.patch

File 19792.2.patch, 5.3 KB (added by GerdP, 4 years ago)
  • src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

     
    134134     * constructor
    135135     */
    136136    public ConflictResolver() {
    137         resolvedCompletely = false;
    138137        build();
    139138        loadIcons();
    140139    }
     
    239238        setMy(conflict.getMy());
    240239        setTheir(conflict.getTheir());
    241240        this.conflict = conflict;
     241        this.resolvedCompletely = false;
    242242        propertiesMerger.populate(conflict);
    243243
    244244        tabbedPane.setEnabledAt(0, true);
  • src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java

     
    5656    public WayNodesConflictResolverCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) {
    5757        if (!isFrozen())
    5858            throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Cannot build resolution command."));
    59         return new WayNodesConflictResolverCommand(conflict, getMergedEntries());
     59        return new WayNodesConflictResolverCommand(conflict, new ArrayList<>(getMergedEntries()));
    6060    }
    6161
    6262    @Override
  • src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java

     
    463463
    464464    @Override
    465465    public void decideRemaining(MergeDecisionType decision) {
    466         if (!model.isDecidedCoord()) {
     466        if (!model.isDecidedDeletedState()) {
    467467            model.decideDeletedStateConflict(decision);
    468468        }
    469469        if (!model.isDecidedCoord()) {
  • src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java

     
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.util.ArrayList;
    67import java.util.Map;
    78
    89import javax.swing.table.DefaultTableModel;
     
    101102        CheckParameterUtil.ensureParameterNotNull(conflict, "conflict");
    102103        if (!isFrozen())
    103104            throw new IllegalArgumentException(tr("Merged members not frozen yet. Cannot build resolution command"));
    104         return new RelationMemberConflictResolverCommand(conflict, getMergedEntries());
     105        return new RelationMemberConflictResolverCommand(conflict, new ArrayList<>(getMergedEntries()));
    105106    }
    106107}
  • src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java

     
    184184    }
    185185
    186186    public TagConflictResolveCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) {
    187         return new TagConflictResolveCommand(conflict, tagMergeItems);
     187        return new TagConflictResolveCommand(conflict, new ArrayList<>(tagMergeItems));
    188188    }
    189189
    190190    public boolean isResolvedCompletely() {
  • src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

     
    517517                    if (c != null) {
    518518                        resolver.populate(c);
    519519                        resolver.decideRemaining(type);
    520                         Command cmd = resolver.buildResolveCommand();
    521                         cmd.executeCommand(); // execute now, see #6529
    522                         commands.add(cmd);
     520                        commands.add(resolver.buildResolveCommand());
    523521                    }
    524522                }
    525523            }
    526             UndoRedoHandler.getInstance().add(new ResolveConflictsCommand(name, commands), false);
     524            UndoRedoHandler.getInstance().add(new SequenceCommand(name, commands));
    527525            refreshView();
    528526        }
    529527    }
    530528
    531     private static class ResolveConflictsCommand extends SequenceCommand {
    532         // just  a wrapper for already executed commands
    533         ResolveConflictsCommand(String name, Collection<Command> sequenz) {
    534             super(name, sequenz, true);
    535             setSequenceComplete(true);
    536         }
    537     }
    538 
    539529    class ResolveToMyVersionAction extends ResolveToAction {
    540530        ResolveToMyVersionAction() {
    541531            super(tr("Resolve to my versions"), tr("Resolves all unresolved conflicts to ''my'' version"),