Changeset 18706 in josm for trunk/src/org
- Timestamp:
- 2023-04-20T22:13:25+02:00 (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r18466 r18706 82 82 } 83 83 84 private enum UserAction { 84 /** 85 * The action a user decided to take with respect to an operation 86 */ 87 enum UserAction { 85 88 /** save/upload layers was successful, proceed with operation */ 86 89 PROCEED, … … 113 116 if (!GraphicsEnvironment.isHeadless()) { 114 117 SaveLayersDialog dialog = new SaveLayersDialog(MainApplication.getMainFrame()); 115 List<AbstractModifiableLayer> layersWithUn modifiedChanges = new ArrayList<>();118 List<AbstractModifiableLayer> layersWithUnsavedChanges = new ArrayList<>(); 116 119 for (Layer l: selectedLayers) { 117 120 if (!(l instanceof AbstractModifiableLayer)) { … … 122 125 ((!odl.isSavable() && !odl.isUploadable()) || 123 126 odl.requiresSaveToFile() || 124 (odl.requiresUploadToServer() && !odl.isUploadDiscouraged()))) {125 layersWithUn modifiedChanges.add(odl);127 odl.requiresUploadToServer())) { 128 layersWithUnsavedChanges.add(odl); 126 129 } 127 130 } 128 131 dialog.prepareForSavingAndUpdatingLayers(reason); 129 if (!layersWithUn modifiedChanges.isEmpty()) {130 dialog.getModel().populate(layersWithUn modifiedChanges);132 if (!layersWithUnsavedChanges.isEmpty()) { 133 dialog.getModel().populate(layersWithUnsavedChanges); 131 134 dialog.setVisible(true); 132 135 switch(dialog.getUserAction()) {
Note:
See TracChangeset
for help on using the changeset viewer.