Changeset 1840 in josm for trunk/src/org
- Timestamp:
- 2009-07-25T17:31:48+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r1839 r1840 69 69 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 70 70 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 71 import org.openstreetmap.josm.gui.OptionPaneUtil; 71 72 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 72 73 import org.openstreetmap.josm.gui.PrimitiveNameFormatter; … … 666 667 } 667 668 669 protected void warnOfCircularReferences(OsmPrimitive primitive) { 670 String msg = tr("<html>You are trying to add a relation to itself.<br>" 671 + "<br>" 672 + "This creates circular references and is therefore discouraged.<br>" 673 + "Skipping relation ''{0}''.</html>", 674 this.nameFormatter.getName(primitive) 675 ); 676 OptionPaneUtil.showMessageDialog(Main.parent, msg, tr("Warning"), JOptionPane.WARNING_MESSAGE); 677 } 678 668 679 protected List<OsmPrimitive> filterConfirmedPrimitives(List<OsmPrimitive> primitives) throws AddAbortException { 669 680 if (primitives == null || primitives.isEmpty()) … … 673 684 while(it.hasNext()) { 674 685 OsmPrimitive primitive = it.next(); 686 if (primitive instanceof Relation && getRelation().equals(primitive)) { 687 warnOfCircularReferences(primitive); 688 continue; 689 } 675 690 if (isPotentialDuplicate(primitive) && confirmAddingPrimtive(primitive)) { 676 691 ret.add(primitive);
Note:
See TracChangeset
for help on using the changeset viewer.