Modify

Opened 15 months ago

Last modified 7 months ago

#7508 new defect

[patch?] Empty download of GPS results to 0;0 saved to last download location

Reported by: Larry0ua Owned by: team
Priority: normal Component: Core
Version: latest Keywords: download
Cc:

Description

Hi! Here are steps to reproduce the bug:

  1. Open JOSM
  2. "Download OSM data"
  3. uncheck OSM data, check GPS data. Select an area where there is no gps tracks. Press Download.
  4. Open download dialog once again - it opens in 0;0 location. Should remember previous download location.

Attachments (2)

possible_fix_7508.patch (3.0 KB) - added by xeen 14 months ago.
possible_fix_7508.2.patch (3.0 KB) - added by xeen 14 months ago.
The actual reason for this is the following: GPX Layers do not remember their download bounds, because they are generally not required. When there is no OSM layer and no GPX data to derive the bounds from, MapView zooms in in (0,0). If a map view is visible, the download dialog takes the visible bounds instead of the one it remembered. Thus it appears as if the download dialog remebered (0,0). Closing the empty GPX layer before opening the download dialog will have it display the correct coordinates. I can think of two solutions: if the GPX layer is the first layer, popup a warning message and don’t create a new layer. The other is implemented in the patch: if there is no GPX data and this is the first layer, zoom to the download bounds instead. I’m not very happy with either approach, so I’ll only attach the patch here but won’t commit it for now.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 15 months ago by Larry0ua

  • Summary changed from Cancel download of GPS results to 0;0 saved to last download location to Empty download of GPS results to 0;0 saved to last download location

Changed 14 months ago by xeen

Changed 14 months ago by xeen

The actual reason for this is the following: GPX Layers do not remember their download bounds, because they are generally not required. When there is no OSM layer and no GPX data to derive the bounds from, MapView zooms in in (0,0). If a map view is visible, the download dialog takes the visible bounds instead of the one it remembered. Thus it appears as if the download dialog remebered (0,0). Closing the empty GPX layer before opening the download dialog will have it display the correct coordinates. I can think of two solutions: if the GPX layer is the first layer, popup a warning message and don’t create a new layer. The other is implemented in the patch: if there is no GPX data and this is the first layer, zoom to the download bounds instead. I’m not very happy with either approach, so I’ll only attach the patch here but won’t commit it for now.

comment:2 Changed 14 months ago by anonymous

  • Summary changed from Empty download of GPS results to 0;0 saved to last download location to [patch?] Empty download of GPS results to 0;0 saved to last download location

comment:3 Changed 8 months ago by stoecker

@xeen: Status of this?

comment:4 Changed 7 months ago by Don-vip

#7976 is related.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change to Larry0ua
as duplicate The resolution will be set to duplicate. Next status will be 'closed'.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.