Modify

Opened 4 years ago

Closed 2 years ago

#19219 closed enhancement (fixed)

[Patch] Save session: Sessions without data layer should always be savable as .jos

Reported by: skyper Owned by: team
Priority: normal Milestone: 22.03
Component: Core Version:
Keywords: template_report session file extension Cc:

Description

What steps will reproduce the problem?

  1. Have some imagery layers and a data layer
  2. Save session as
  3. Deselect all data layer and press "enter"
  4. Look at the file extension and its options in the next dialog

What is the expected result?

.jos should be default or at least available

What happens instead?

Only .joz available

Please provide any additional information below. Attach a screenshot if possible.

The file type needs to be chosen after the user's decision of layers

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-05-10 15:58:34 +0200 (Sun, 10 May 2020)
Revision:16402
Build-Date:2020-05-11 01:30:50
URL:https://josm.openstreetmap.de/svn/trunk

Attachments (0)

Change History (8)

comment:1 by simon04, 4 years ago

Type: defectenhancement

comment:2 by Bjoeni, 3 years ago

Owner: changed from team to Bjoeni
Status: newassigned

comment:3 by Bjoeni, 2 years ago

Milestone: 22.02
Owner: changed from Bjoeni to team
Status: assignednew
Summary: Save session: Sessions without data layer should always be savable as .jos[Patch] Save session: Sessions without data layer should always be savable as .jos
  • only consider exported layers for *.jos/*.joz file type determination
    • src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

       
      116116            throw new UserCancelException();
      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(l -> exporters.get(l))
      120125                .anyMatch(ex -> ex != null && ex.requiresZip());
      121126
      122127        FileFilter joz = new ExtensionFileFilter("joz", "joz", tr("Session file (archive) (*.joz)"));
       
      158163            }
      159164        }
      160165
      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());
      165 
      166166        Stream<Layer> layersToSaveStream = layersOut.stream()
      167167                .filter(layer -> layer.isSavable()
      168168                        && layer instanceof AbstractModifiableLayer

Remaining issue: Sessions that include marker layers can still not be saved as *.jos, even if the GPX file is saved as a local file. See #21813

comment:4 by stoecker, 2 years ago

Milestone: 22.0222.03

Milestone renamed

comment:5 by stoecker, 2 years ago

Milestone: 22.0322.02

Join milestones

comment:6 by Don-vip, 2 years ago

Milestone: 22.0222.03

comment:7 by Bjoeni, 2 years ago

Note: The patches #19219, #21813, #21922, #21923 all affect session handling. Whilst I don't think that they conflict, I only tested them all together.

It might make sense to only apply the all.patch that I attached on #21923

comment:8 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18406/josm:

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)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.