Ticket #19792: 19792.2.patch
File 19792.2.patch, 5.3 KB (added by , 4 years ago) |
---|
-
src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
134 134 * constructor 135 135 */ 136 136 public ConflictResolver() { 137 resolvedCompletely = false;138 137 build(); 139 138 loadIcons(); 140 139 } … … 239 238 setMy(conflict.getMy()); 240 239 setTheir(conflict.getTheir()); 241 240 this.conflict = conflict; 241 this.resolvedCompletely = false; 242 242 propertiesMerger.populate(conflict); 243 243 244 244 tabbedPane.setEnabledAt(0, true); -
src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
56 56 public WayNodesConflictResolverCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) { 57 57 if (!isFrozen()) 58 58 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())); 60 60 } 61 61 62 62 @Override -
src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
463 463 464 464 @Override 465 465 public void decideRemaining(MergeDecisionType decision) { 466 if (!model.isDecided Coord()) {466 if (!model.isDecidedDeletedState()) { 467 467 model.decideDeletedStateConflict(decision); 468 468 } 469 469 if (!model.isDecidedCoord()) { -
src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.util.ArrayList; 6 7 import java.util.Map; 7 8 8 9 import javax.swing.table.DefaultTableModel; … … 101 102 CheckParameterUtil.ensureParameterNotNull(conflict, "conflict"); 102 103 if (!isFrozen()) 103 104 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())); 105 106 } 106 107 } -
src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java
184 184 } 185 185 186 186 public TagConflictResolveCommand buildResolveCommand(Conflict<? extends OsmPrimitive> conflict) { 187 return new TagConflictResolveCommand(conflict, tagMergeItems);187 return new TagConflictResolveCommand(conflict, new ArrayList<>(tagMergeItems)); 188 188 } 189 189 190 190 public boolean isResolvedCompletely() { -
src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
517 517 if (c != null) { 518 518 resolver.populate(c); 519 519 resolver.decideRemaining(type); 520 Command cmd = resolver.buildResolveCommand(); 521 cmd.executeCommand(); // execute now, see #6529 522 commands.add(cmd); 520 commands.add(resolver.buildResolveCommand()); 523 521 } 524 522 } 525 523 } 526 UndoRedoHandler.getInstance().add(new ResolveConflictsCommand(name, commands), false);524 UndoRedoHandler.getInstance().add(new SequenceCommand(name, commands)); 527 525 refreshView(); 528 526 } 529 527 } 530 528 531 private static class ResolveConflictsCommand extends SequenceCommand {532 // just a wrapper for already executed commands533 ResolveConflictsCommand(String name, Collection<Command> sequenz) {534 super(name, sequenz, true);535 setSequenceComplete(true);536 }537 }538 539 529 class ResolveToMyVersionAction extends ResolveToAction { 540 530 ResolveToMyVersionAction() { 541 531 super(tr("Resolve to my versions"), tr("Resolves all unresolved conflicts to ''my'' version"),