Ignore:
Timestamp:
2017-09-26T01:19:15+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15275 - Download dialog does not remember settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/OSMDownloadSource.java

    r12846 r12900  
    4949
    5050    @Override
    51     public AbstractDownloadSourcePanel<OSMDownloadData> createPanel() {
    52         return new OSMDownloadSourcePanel(this);
     51    public AbstractDownloadSourcePanel<OSMDownloadData> createPanel(DownloadDialog dialog) {
     52        return new OSMDownloadSourcePanel(this, dialog);
    5353    }
    5454
     
    145145        /**
    146146         * Creates a new {@link OSMDownloadSourcePanel}.
     147         * @param dialog the parent download dialog, as {@code DownloadDialog.getInstance()} might not be initialized yet
    147148         * @param ds The osm download source the panel is for.
     149         * @since 12900
    148150         */
    149         public OSMDownloadSourcePanel(OSMDownloadSource ds) {
     151        public OSMDownloadSourcePanel(OSMDownloadSource ds, DownloadDialog dialog) {
    150152            super(ds);
    151153            setLayout(new GridBagLayout());
     
    153155            // size check depends on selected data source
    154156            final ChangeListener checkboxChangeListener = e ->
    155                     DownloadDialog.getInstance().getSelectedDownloadArea().ifPresent(this::updateSizeCheck);
     157                    dialog.getSelectedDownloadArea().ifPresent(this::updateSizeCheck);
    156158
    157159            // adding the download tasks
Note: See TracChangeset for help on using the changeset viewer.