Changeset 34568 in osm for applications/editors/josm/plugins/undelete/src
- Timestamp:
- 2018-08-18T20:51:52+02:00 (6 years ago)
- 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 12 12 import javax.swing.JOptionPane; 13 13 14 import org.openstreetmap.josm.Main;15 14 import org.openstreetmap.josm.actions.AutoScaleAction; 16 15 import org.openstreetmap.josm.actions.JosmAction; … … 37 36 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 38 37 import org.openstreetmap.josm.gui.util.GuiHelper; 38 import org.openstreetmap.josm.spi.preferences.Config; 39 39 import org.openstreetmap.josm.tools.Logging; 40 40 import org.openstreetmap.josm.tools.Shortcut; … … 199 199 @Override 200 200 public void actionPerformed(ActionEvent e) { 201 UndeleteDialog dialog = new UndeleteDialog(Main .parent);201 UndeleteDialog dialog = new UndeleteDialog(MainApplication.getMainFrame()); 202 202 if (dialog.showDialog().getValue() != 1) 203 203 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()); 206 206 undelete(dialog.isNewLayerSelected(), dialog.getOsmIds(), null); 207 207 } -
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteDialog.java
r33980 r34568 15 15 import javax.swing.KeyStroke; 16 16 17 import org.openstreetmap.josm.Main;18 17 import org.openstreetmap.josm.data.osm.PrimitiveId; 19 18 import org.openstreetmap.josm.gui.ExtendedDialog; 20 19 import org.openstreetmap.josm.gui.widgets.OsmIdTextField; 20 import org.openstreetmap.josm.spi.preferences.Config; 21 21 22 22 public class UndeleteDialog extends ExtendedDialog { … … 36 36 all.add(new JLabel(tr("Object ID:")), gc); 37 37 38 tfId.setText( Main.pref.get("undelete.osmid"));38 tfId.setText(Config.getPref().get("undelete.osmid")); 39 39 tfId.setToolTipText(tr("Enter the type and ID of the objects that should be undeleted, e.g., ''n1 w2''")); 40 40 // forward the enter key stroke to the undelete button … … 49 49 50 50 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")); 52 52 all.add(layer, gc); 53 53 setContent(all, false);
Note:
See TracChangeset
for help on using the changeset viewer.