Changeset 3208 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-04-25T15:31:07+02:00 (15 years ago)
Author:
jttt
Message:

Remember selected values in download along track dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r3128 r3208  
    7676
    7777public class GpxLayer extends Layer {
     78
     79    private static final String PREF_DOWNLOAD_ALONG_TRACK_DISTANCE = "gpxLayer.downloadAlongTrack.distance";
     80    private static final String PREF_DOWNLOAD_ALONG_TRACK_AREA = "gpxLayer.downloadAlongTrack.distance";
     81
    7882    public GpxData data;
    7983    protected static final double PHI = Math.toRadians(15);
     
    871875            }
    872876            JList buffer = new JList(s);
     877            buffer.setSelectedIndex(Main.pref.getInteger(PREF_DOWNLOAD_ALONG_TRACK_DISTANCE, 0));
    873878            msg.add(buffer, GBC.eol());
    874879            msg.add(new JLabel(tr("Maximum area per request:")), GBC.eol());
     
    878883            }
    879884            JList maxRect = new JList(s);
     885            maxRect.setSelectedIndex(Main.pref.getInteger(PREF_DOWNLOAD_ALONG_TRACK_AREA, 0));
    880886            msg.add(maxRect, GBC.eol());
    881887
     
    894900                // continue
    895901            }
     902
     903            Main.pref.putInteger(PREF_DOWNLOAD_ALONG_TRACK_DISTANCE, buffer.getSelectedIndex());
     904            Main.pref.putInteger(PREF_DOWNLOAD_ALONG_TRACK_AREA, maxRect.getSelectedIndex());
    896905
    897906            /*
Note: See TracChangeset for help on using the changeset viewer.