Ignore:
Timestamp:
2010-06-08T21:56:38+02:00 (14 years ago)
Author:
jttt
Message:

Validate tagging presets when they're added in Preferences dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java

    r3308 r3321  
    181181    }
    182182
     183    public boolean hasActiveStylesChanged() {
     184        return !activeStylesModel.getStyles().equals(Main.pref.getCollection(pref, Collections.<String>emptyList()));
     185    }
     186
     187    public Collection<String> getActiveStyles() {
     188        return activeStylesModel.getStyles();
     189    }
     190
     191    public void removeSource(String source) {
     192        activeStylesModel.remove(source);
     193    }
     194
    183195    public boolean finish() {
    184196        boolean changed = false;
     
    343355                i++;
    344356            }
     357            fireTableDataChanged();
     358        }
     359
     360        public void remove(String source) {
     361            data.remove(source);
    345362            fireTableDataChanged();
    346363        }
     
    804821                    // ignore the exception and return
    805822                    return;
    806                 warn(e);
     823                OsmTransferException ex = new OsmTransferException(e);
     824                ex.setUrl(url);
     825                warn(ex);
    807826                return;
    808827            }
     
    821840            if (fileChooser == null) {
    822841                this.fileChooser = new JFileChooser();
    823                 if(!isFile)
     842                if(!isFile) {
    824843                    fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
     844                }
    825845            }
    826846            return fileChooser;
Note: See TracChangeset for help on using the changeset viewer.