Changeset 9751 in josm for trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java
- Timestamp:
- 2016-02-07T17:06:04+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java
r9078 r9751 47 47 48 48 /** 49 * Replies true if the layer can be saved to a file 50 * 51 * @return {@code true} if the layer can be saved to a file; {@code false} otherwise 52 */ 53 public boolean isSavable() { 54 return layer.isSavable(); 55 } 56 57 /** 58 * Replies true if the layer can be uploaded to a server 59 * 60 * @return {@code true} if the layer can be uploaded to a server; {@code false} otherwise 61 */ 62 public boolean isUploadable() { 63 return layer.isUploadable(); 64 } 65 66 /** 49 67 * Replies true if preconditions should be checked before saving; false, otherwise 50 68 * … … 81 99 */ 82 100 public void setDoSaveToFile(boolean doSaveToFile) { 83 this.doSaveToFile = doSaveToFile;101 this.doSaveToFile = isSavable() ? doSaveToFile : false; 84 102 } 85 103 … … 94 112 95 113 /** 96 * Sets whether this layer should be uploaded to a file114 * Sets whether this layer should be uploaded to a server 97 115 * 98 116 * @param doUploadToServer {@code true} to upload; {@code false}, to skip uploading 99 117 */ 100 101 118 public void setDoUploadToServer(boolean doUploadToServer) { 102 this.doUploadToServer = doUploadToServer;119 this.doUploadToServer = isUploadable() ? doUploadToServer : false; 103 120 } 104 121
Note:
See TracChangeset
for help on using the changeset viewer.