Ignore:
Timestamp:
2018-02-19T01:14:22+01:00 (6 years ago)
Author:
Don-vip
Message:

see #8039, see #10456 - disable more actions modifying the dataset

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java

    r11381 r13446  
    4141            int answer = t.showDialog(selection, false);
    4242
    43             if (answer == TaggingPreset.DIALOG_ANSWER_APPLY) {
     43            if (answer == TaggingPreset.DIALOG_ANSWER_APPLY && !selection.iterator().next().getDataSet().isReadOnly()) {
    4444                presetHandler.updateTags(t.getChangedTags());
    4545            }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r13434 r13446  
    12711271            Collection<OsmPrimitive> sel = Main.main.getInProgressSelection();
    12721272            String clipboard = ClipboardUtils.getClipboardStringContent();
    1273             if (sel.isEmpty() || clipboard == null)
     1273            if (sel.isEmpty() || clipboard == null || sel.iterator().next().getDataSet().isReadOnly())
    12741274                return;
    12751275            MainApplication.undoRedo.add(new ChangePropertyCommand(sel, key, Utils.strip(clipboard)));
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java

    r13252 r13446  
    493493
    494494            answer = new PresetDialog(p, title, preset_name_label ? null : (ImageIcon) getValue(Action.SMALL_ICON),
    495                     sel.isEmpty(), showNewRelation).getValue();
     495                    sel.isEmpty() || sel.iterator().next().getDataSet().isReadOnly(), showNewRelation).getValue();
    496496        }
    497497        if (!showNewRelation && answer == 2)
Note: See TracChangeset for help on using the changeset viewer.