Changeset 18406 in josm for trunk/src/org


Ignore:
Timestamp:
2022-03-22T16:31:47+01:00 (3 years ago)
Author:
taylor.smock
Message:

fix #19219: Sessions without data layer should be savable as .jos

  • only consider exported layers for *.jos/*.joz file type determination (patch by Bjoeni, modified)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

    r18287 r18406  
    117117        }
    118118
    119         boolean zipRequired = layers.stream().map(l -> exporters.get(l))
     119        // TODO: resolve dependencies for layers excluded by the user
     120        List<Layer> layersOut = layers.stream()
     121                .filter(layer -> exporters.get(layer) != null && exporters.get(layer).shallExport())
     122                .collect(Collectors.toList());
     123
     124        boolean zipRequired = layersOut.stream().map(exporters::get)
    120125                .anyMatch(ex -> ex != null && ex.requiresZip());
    121126
     
    158163            }
    159164        }
    160 
    161         // TODO: resolve dependencies for layers excluded by the user
    162         List<Layer> layersOut = layers.stream()
    163                 .filter(layer -> exporters.get(layer) != null && exporters.get(layer).shallExport())
    164                 .collect(Collectors.toList());
    165165
    166166        Stream<Layer> layersToSaveStream = layersOut.stream()
Note: See TracChangeset for help on using the changeset viewer.