Changeset 3362 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
- Timestamp:
- 2010-07-03T22:08:57+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
r3083 r3362 26 26 import org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMergeModel; 27 27 import org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMerger; 28 import org.openstreetmap.josm.gui.conflict.pair.properties.OperationCancelledException;29 28 import org.openstreetmap.josm.gui.conflict.pair.properties.PropertiesMergeModel; 30 29 import org.openstreetmap.josm.gui.conflict.pair.properties.PropertiesMerger; … … 235 234 this.conflict = conflict; 236 235 propertiesMerger.populate(conflict); 237 if (propertiesMerger.getModel().hasVisibleStateConflict()) { 238 tabbedPane.setEnabledAt(1, false); 239 tabbedPane.setEnabledAt(2, false); 240 tabbedPane.setEnabledAt(3, false); 241 return; 242 } 236 243 237 tabbedPane.setEnabledAt(0, true); 244 238 tagMerger.populate(conflict); … … 270 264 * @return the resolution command 271 265 */ 272 public Command buildResolveCommand() throws OperationCancelledException{266 public Command buildResolveCommand() { 273 267 ArrayList<Command> commands = new ArrayList<Command>(); 274 if (propertiesMerger.getModel().hasVisibleStateConflict()) { 275 if (propertiesMerger.getModel().isDecidedVisibleState()) { 276 commands.addAll(propertiesMerger.getModel().buildResolveCommand(conflict)); 277 } 278 } else { 279 if (tagMerger.getModel().getNumResolvedConflicts() > 0) { 280 commands.add(tagMerger.getModel().buildResolveCommand(conflict)); 281 } 282 commands.addAll(propertiesMerger.getModel().buildResolveCommand(conflict)); 283 if (my instanceof Way && nodeListMerger.getModel().isFrozen()) { 284 NodeListMergeModel model =(NodeListMergeModel)nodeListMerger.getModel(); 285 commands.add(model.buildResolveCommand(conflict)); 286 } else if (my instanceof Relation && relationMemberMerger.getModel().isFrozen()) { 287 RelationMemberListMergeModel model =(RelationMemberListMergeModel)relationMemberMerger.getModel(); 288 commands.add(model.buildResolveCommand((Relation)my, (Relation)their)); 289 } 290 if (isResolvedCompletely()) { 291 commands.add(new VersionConflictResolveCommand(conflict)); 292 commands.add(new ModifiedConflictResolveCommand(conflict)); 293 } 268 269 if (tagMerger.getModel().getNumResolvedConflicts() > 0) { 270 commands.add(tagMerger.getModel().buildResolveCommand(conflict)); 271 } 272 commands.addAll(propertiesMerger.getModel().buildResolveCommand(conflict)); 273 if (my instanceof Way && nodeListMerger.getModel().isFrozen()) { 274 NodeListMergeModel model = (NodeListMergeModel) nodeListMerger.getModel(); 275 commands.add(model.buildResolveCommand(conflict)); 276 } else if (my instanceof Relation && relationMemberMerger.getModel().isFrozen()) { 277 RelationMemberListMergeModel model = (RelationMemberListMergeModel) relationMemberMerger.getModel(); 278 commands.add(model.buildResolveCommand((Relation) my, (Relation) their)); 279 } 280 if (isResolvedCompletely()) { 281 commands.add(new VersionConflictResolveCommand(conflict)); 282 commands.add(new ModifiedConflictResolveCommand(conflict)); 294 283 } 295 284 return new SequenceCommand(tr("Conflict Resolution"), commands);
Note:
See TracChangeset
for help on using the changeset viewer.