Changeset 5014 in josm for trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
- Timestamp:
- 2012-02-21T19:26:54+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r4911 r5014 10 10 import java.util.LinkedList; 11 11 import java.util.List; 12 12 13 import javax.swing.JFileChooser; 13 14 import javax.swing.JOptionPane; … … 33 34 @Override 34 35 public void actionPerformed(ActionEvent e) { 35 if (!isEnabled()) { 36 return; 37 } 36 if (!isEnabled()) 37 return; 38 38 boolean saved = doSave(); 39 39 if (saved) { … … 60 60 } 61 61 62 public boolean doSave(Layer layer, File file) {62 public static boolean doSave(Layer layer, File file) { 63 63 if(!checkSaveConditions(layer)) 64 64 return false; … … 66 66 } 67 67 68 private boolean doInternalSave(Layer layer, File file) {68 private static boolean doInternalSave(Layer layer, File file) { 69 69 if (file == null) 70 70 return false; … … 104 104 * @return <code>true</code>, if it is safe to save. 105 105 */ 106 public boolean checkSaveConditions(Layer layer) {106 public static boolean checkSaveConditions(Layer layer) { 107 107 if (layer instanceof GpxLayer) 108 108 return ((GpxLayer)layer).data != null; … … 153 153 * @return <code>true</code>, if a save result in an empty data set. 154 154 */ 155 private boolean isDataSetEmpty(OsmDataLayer layer) {155 private static boolean isDataSetEmpty(OsmDataLayer layer) { 156 156 for (OsmPrimitive osm : layer.data.allNonDeletedPrimitives()) 157 157 if (!osm.isDeleted() || !osm.isNewOrUndeleted())
Note:
See TracChangeset
for help on using the changeset viewer.