Ticket #18358: 18358.patch

File 18358.patch, 851 bytes (added by taylor.smock, 6 years ago)

Allows removal of a DownloadSource if the exact object is known (e.g., stored by the plugin somewhere).

  • src/org/openstreetmap/josm/gui/download/DownloadDialog.java

     
    340340    }
    341341
    342342    /**
     343     * Remove a download source from the download dialog
     344     *
     345     * @param downloadSource The download source to be removed.
     346     * @return see {@link List#remove}
     347     * @since xxx
     348     */
     349    public static boolean removeDownloadSource(DownloadSource<?> downloadSource) {
     350        if (downloadSources.contains(downloadSource)) {
     351            return downloadSources.remove(downloadSource);
     352        }
     353        return false;
     354    }
     355
     356    /**
    343357     * Refreshes the tile sources.
    344358     * @since 6364
    345359     */