Changeset 1397 in josm for trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
- Timestamp:
- 2009-02-14T12:25:54+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r1373 r1397 17 17 import org.openstreetmap.josm.Main; 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 import org.openstreetmap.josm.gui.ExtendedDialog; 19 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 20 21 import org.openstreetmap.josm.gui.layer.Layer; … … 78 79 } 79 80 80 if (layer instanceof OsmDataLayer && isDataSetEmpty((OsmDataLayer)layer) && JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(Main.parent,tr("The document contains no data.Save anyway?"), tr("Empty document"), JOptionPane.YES_NO_OPTION)) {81 if (layer instanceof OsmDataLayer && isDataSetEmpty((OsmDataLayer)layer) && 1 != new ExtendedDialog(Main.parent, tr("Empty document"), tr("The document contains no data."), new String[] {tr("Save anyway"), tr("Cancel")}, new String[] {"save.png", "cancel.png"}).getValue()) { 81 82 return false; 82 83 } … … 85 86 } 86 87 if (!Main.map.conflictDialog.conflicts.isEmpty()) { 87 int answer = JOptionPane.showConfirmDialog(Main.parent, 88 tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?"),tr("Conflicts"), JOptionPane.YES_NO_OPTION); 89 if (answer != JOptionPane.YES_OPTION) 90 return false; 88 int answer = new ExtendedDialog(Main.parent, 89 tr("Conflicts"), 90 tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?"), 91 new String[] {tr("Reject Conflicts and Save"), tr("Cancel")}, 92 new String[] {"save.png", "cancel.png"}).getValue(); 93 94 if (answer != 1) return false; 91 95 } 92 96 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
