Changeset 14450 in josm


Ignore:
Timestamp:
2018-11-25T15:35:49+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #17024 - hide "Download as new layer" button when there are no data layers

File:
1 edited

Legend:

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

    r14435 r14450  
    4747import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
    4848import org.openstreetmap.josm.gui.help.HelpUtil;
     49import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4950import org.openstreetmap.josm.gui.util.GuiHelper;
    5051import org.openstreetmap.josm.gui.util.WindowGeometry;
     
    434435    public void setVisible(boolean visible) {
    435436        if (visible) {
     437            btnDownloadNewLayer.setVisible(
     438                    !MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class).isEmpty());
    436439            new WindowGeometry(
    437440                    getClass().getName() + ".geometry",
     
    458461    /**
    459462     * Gets the global settings of the download dialog.
     463     * @param newLayer The flag defining if a new layer must be created for the downloaded data.
    460464     * @return The {@link DownloadSettings} object that describes the current state of
    461465     * the download dialog.
Note: See TracChangeset for help on using the changeset viewer.