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

update to JOSM 14153

Location:
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java

    r34273 r34568  
    1212import javax.swing.JOptionPane;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.actions.AutoScaleAction;
    1615import org.openstreetmap.josm.actions.JosmAction;
     
    3736import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    3837import org.openstreetmap.josm.gui.util.GuiHelper;
     38import org.openstreetmap.josm.spi.preferences.Config;
    3939import org.openstreetmap.josm.tools.Logging;
    4040import org.openstreetmap.josm.tools.Shortcut;
     
    199199    @Override
    200200    public void actionPerformed(ActionEvent e) {
    201         UndeleteDialog dialog = new UndeleteDialog(Main.parent);
     201        UndeleteDialog dialog = new UndeleteDialog(MainApplication.getMainFrame());
    202202        if (dialog.showDialog().getValue() != 1)
    203203            return;
    204         Main.pref.putBoolean("undelete.newlayer", dialog.isNewLayerSelected());
    205         Main.pref.put("undelete.osmid", dialog.getOsmIdsString());
     204        Config.getPref().putBoolean("undelete.newlayer", dialog.isNewLayerSelected());
     205        Config.getPref().put("undelete.osmid", dialog.getOsmIdsString());
    206206        undelete(dialog.isNewLayerSelected(), dialog.getOsmIds(), null);
    207207    }
  • applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteDialog.java

    r33980 r34568  
    1515import javax.swing.KeyStroke;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.data.osm.PrimitiveId;
    1918import org.openstreetmap.josm.gui.ExtendedDialog;
    2019import org.openstreetmap.josm.gui.widgets.OsmIdTextField;
     20import org.openstreetmap.josm.spi.preferences.Config;
    2121
    2222public class UndeleteDialog extends ExtendedDialog {
     
    3636        all.add(new JLabel(tr("Object ID:")), gc);
    3737
    38         tfId.setText(Main.pref.get("undelete.osmid"));
     38        tfId.setText(Config.getPref().get("undelete.osmid"));
    3939        tfId.setToolTipText(tr("Enter the type and ID of the objects that should be undeleted, e.g., ''n1 w2''"));
    4040        // forward the enter key stroke to the undelete button
     
    4949
    5050        layer.setToolTipText(tr("Select if the data should be added into a new layer"));
    51         layer.setSelected(Main.pref.getBoolean("undelete.newlayer"));
     51        layer.setSelected(Config.getPref().getBoolean("undelete.newlayer"));
    5252        all.add(layer, gc);
    5353        setContent(all, false);
Note: See TracChangeset for help on using the changeset viewer.