- Timestamp:
- 2010-01-23T14:42:25+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/pair
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
r2846 r2882 5 5 6 6 import java.util.ArrayList; 7 import java.util.logging.Logger;8 7 8 import javax.swing.JOptionPane; 9 9 import javax.swing.table.DefaultTableModel; 10 10 11 11 import org.openstreetmap.josm.command.WayNodesConflictResolverCommand; 12 import org.openstreetmap.josm.data.osm.DataSet; 12 13 import org.openstreetmap.josm.data.osm.Node; 13 14 import org.openstreetmap.josm.data.osm.Way; 15 import org.openstreetmap.josm.gui.DefaultNameFormatter; 14 16 import org.openstreetmap.josm.gui.conflict.pair.ListMergeModel; 15 17 import org.openstreetmap.josm.gui.conflict.pair.ListRole; … … 17 19 18 20 public class NodeListMergeModel extends ListMergeModel<Node>{ 21 //private static final Logger logger = Logger.getLogger(NodeListMergeModel.class.getName()); 19 22 20 private static final Logger logger = Logger.getLogger(NodeListMergeModel.class.getName());23 private DataSet myDataset; 21 24 22 25 /** … … 30 33 */ 31 34 public void populate(Way my, Way their) { 35 this.myDataset = my.getDataSet(); 36 32 37 CheckParameterUtil.ensureParameterNotNull(my, "my"); 33 38 CheckParameterUtil.ensureParameterNotNull(their, "their"); … … 84 89 @Override 85 90 protected Node cloneEntryForMergedList(Node entry) { 86 return entry; 91 Node node = (Node) myDataset.getPrimitiveById(entry); 92 if (node.isDeleted()) { 93 JOptionPane.showMessageDialog(null, tr("Node {0} cannot be added to the way because it was deleted", node.getDisplayName(DefaultNameFormatter.getInstance()))); 94 return null; 95 } else 96 return node; 87 97 } 88 98 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
r2881 r2882 101 101 if (primitive.isDeleted()) { 102 102 JOptionPane.showMessageDialog(null, 103 tr("Primitive {0} cannot be added to the relation because it was removed.",103 tr("Primitive {0} cannot be added to the relation because it was deleted.", 104 104 primitive.getDisplayName(DefaultNameFormatter.getInstance()))); 105 105 return null;
Note:
See TracChangeset
for help on using the changeset viewer.