Modify

Opened 13 years ago

Closed 12 years ago

#7508 closed defect (worksforme)

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

Reported by: Larry0ua Owned by: team
Priority: normal Milestone:
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 13 years ago.
possible_fix_7508.2.patch (3.0 KB ) - added by xeen 13 years 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 (7)

comment:1 by Larry0ua, 13 years ago

Summary: Cancel download of GPS results to 0;0 saved to last download locationEmpty download of GPS results to 0;0 saved to last download location

by xeen, 13 years ago

Attachment: possible_fix_7508.patch added

by xeen, 13 years ago

Attachment: possible_fix_7508.2.patch added

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 by anonymous, 13 years ago

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

comment:3 by stoecker, 13 years ago

@xeen: Status of this?

comment:4 by Don-vip, 12 years ago

#7976 is related.

comment:5 by xeen, 12 years ago

Resolution: worksforme
Status: newclosed

This bug doesn’t apply anymore. When downloading an empty (gps track wise) region, no gpx layer is created. Re-opening the download dialog will place it at the same position as before.

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.