Changeset 34551 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateRelationAction.java
- Timestamp:
- 2018-08-18T20:08:26+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/CreateRelationAction.java
r33694 r34551 19 19 import javax.swing.JPanel; 20 20 21 import org.openstreetmap.josm.Main;22 21 import org.openstreetmap.josm.actions.JosmAction; 23 22 import org.openstreetmap.josm.command.AddCommand; 23 import org.openstreetmap.josm.data.UndoRedoHandler; 24 24 import org.openstreetmap.josm.data.osm.DataSet; 25 25 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 28 28 import org.openstreetmap.josm.gui.MainApplication; 29 29 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox; 30 import org.openstreetmap.josm.spi.preferences.Config; 30 31 import org.openstreetmap.josm.tools.GBC; 31 32 import org.openstreetmap.josm.tools.Shortcut; … … 70 71 } 71 72 72 MainApplication.undoRedo.add(new AddCommand(ds, rel));73 UndoRedoHandler.getInstance().add(new AddCommand(ds, rel)); 73 74 74 75 if (chRel != null) { … … 105 106 keys.setPossibleItems(RELATION_TYPES); 106 107 keys.setEditable(true); 107 keys.getEditor().setItem( Main.pref.get(PREF_LASTTYPE, "multipolygon"));108 keys.getEditor().setItem(Config.getPref().get(PREF_LASTTYPE, "multipolygon")); 108 109 109 110 panel.add(new JLabel(tr("Type")), GBC.std()); … … 118 119 } 119 120 }; 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")); 121 122 dlg.setModalityType(ModalityType.DOCUMENT_MODAL); 122 123 … … 137 138 138 139 String result = keys.getEditor().getItem().toString().trim(); 139 Main.pref.put(PREF_LASTTYPE, result);140 Config.getPref().put(PREF_LASTTYPE, result); 140 141 return result; 141 142 }
Note:
See TracChangeset
for help on using the changeset viewer.