Ignore:
Timestamp:
2018-08-18T20:08:26+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateRelationAction.java

    r33694 r34551  
    1919import javax.swing.JPanel;
    2020
    21 import org.openstreetmap.josm.Main;
    2221import org.openstreetmap.josm.actions.JosmAction;
    2322import org.openstreetmap.josm.command.AddCommand;
     23import org.openstreetmap.josm.data.UndoRedoHandler;
    2424import org.openstreetmap.josm.data.osm.DataSet;
    2525import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    2828import org.openstreetmap.josm.gui.MainApplication;
    2929import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox;
     30import org.openstreetmap.josm.spi.preferences.Config;
    3031import org.openstreetmap.josm.tools.GBC;
    3132import org.openstreetmap.josm.tools.Shortcut;
     
    7071        }
    7172
    72         MainApplication.undoRedo.add(new AddCommand(ds, rel));
     73        UndoRedoHandler.getInstance().add(new AddCommand(ds, rel));
    7374
    7475        if (chRel != null) {
     
    105106        keys.setPossibleItems(RELATION_TYPES);
    106107        keys.setEditable(true);
    107         keys.getEditor().setItem(Main.pref.get(PREF_LASTTYPE, "multipolygon"));
     108        keys.getEditor().setItem(Config.getPref().get(PREF_LASTTYPE, "multipolygon"));
    108109
    109110        panel.add(new JLabel(tr("Type")), GBC.std());
     
    118119            }
    119120        };
    120         final JDialog dlg = optionPane.createDialog(Main.parent, tr("Create a new relation"));
     121        final JDialog dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Create a new relation"));
    121122        dlg.setModalityType(ModalityType.DOCUMENT_MODAL);
    122123
     
    137138
    138139        String result = keys.getEditor().getItem().toString().trim();
    139         Main.pref.put(PREF_LASTTYPE, result);
     140        Config.getPref().put(PREF_LASTTYPE, result);
    140141        return result;
    141142    }
Note: See TracChangeset for help on using the changeset viewer.