Ignore:
Timestamp:
2014-06-01T14:07:18+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10086 - fix EDT violation causing freeze of Save/upload dialog for empty or conflicting layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java

    r6084 r7204  
    1616    /** the osm data layer */
    1717    private OsmDataLayer layer;
     18    private boolean doCheckSaveConditions;
    1819    private boolean doSaveToFile;
    1920    private boolean doUploadToServer;
     
    2324
    2425    /**
    25      *
     26     * Constructs a new {@code SaveLayerInfo}.
    2627     * @param layer the layer. Must not be null.
    2728     * @throws IllegalArgumentException thrown if layer is null
     
    3031        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
    3132        this.layer = layer;
     33        this.doCheckSaveConditions = true;
    3234        this.doSaveToFile = layer.requiresSaveToFile();
    3335        this.doUploadToServer = layer.requiresUploadToServer() && !layer.isUploadDiscouraged();
     
    4244    public OsmDataLayer getLayer() {
    4345        return layer;
     46    }
     47
     48    /**
     49     * Replies true if preconditions should be checked before saving; false, otherwise
     50     *
     51     * @return true if preconditions should be checked before saving; false, otherwise
     52     * @since 7204
     53     */
     54    public boolean isDoCheckSaveConditions() {
     55        return doCheckSaveConditions;
     56    }
     57
     58    /**
     59     * Sets whether preconditions should be checked before saving
     60     *
     61     * @param doCheckSaveConditions true to check save preconditions; false, to skip checking
     62     * @since 7204
     63     */
     64    public void setDoCheckSaveConditions(boolean doCheckSaveConditions) {
     65        this.doCheckSaveConditions = doCheckSaveConditions;
    4466    }
    4567
Note: See TracChangeset for help on using the changeset viewer.