Changeset 32738 in osm for applications/editors
- Timestamp:
- 2016-07-28T23:12:29+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/FastDraw
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FastDraw/build.xml
r32680 r32738 4 4 <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="10 580"/>6 <property name="plugin.main.version" value="10657"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java
r32548 r32738 21 21 import org.openstreetmap.josm.Main; 22 22 import org.openstreetmap.josm.gui.ExtendedDialog; 23 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils; 23 24 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 24 25 import org.openstreetmap.josm.tools.GBC; 25 26 import org.openstreetmap.josm.tools.ImageProvider; 26 27 import org.openstreetmap.josm.tools.TextTagParser; 27 import org.openstreetmap.josm.tools.Utils;28 28 29 29 public class FastDrawConfigDialog extends ExtendedDialog { … … 57 57 @Override 58 58 public void actionPerformed(ActionEvent e) { 59 String s = Utils.getClipboardContent();59 String s = ClipboardUtils.getClipboardStringContent(); 60 60 if (TextTagParser.getValidatedTagsFromText(s) != null) { 61 61 addTags.setText(s); -
applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java
r32548 r32738 8 8 import java.awt.Graphics2D; 9 9 import java.awt.Point; 10 import java.awt.datatransfer.UnsupportedFlavorException; 10 11 import java.awt.event.KeyEvent; 11 12 import java.awt.event.MouseEvent; 13 import java.io.IOException; 12 14 import java.util.ArrayList; 13 15 import java.util.Collection; … … 38 40 import org.openstreetmap.josm.gui.MapFrame; 39 41 import org.openstreetmap.josm.gui.MapView; 42 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils; 43 import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData; 40 44 import org.openstreetmap.josm.gui.layer.Layer; 41 45 import org.openstreetmap.josm.gui.layer.MapViewPaintable; … … 578 582 Set<OsmPrimitive> ts = new HashSet<>(); 579 583 ts.add(w); 580 TagPaster tp = new TagPaster(Main.pasteBuffer.getDirectlyAdded(), ts); 581 List<Tag> execute = tp.execute(); 582 for (Tag t : execute) { 583 w.put(t.getKey(), t.getValue()); 584 try { 585 PrimitiveTransferData data = (PrimitiveTransferData) ClipboardUtils.getClipboard().getData(PrimitiveTransferData.DATA_FLAVOR); 586 for (Tag t : new TagPaster(data.getDirectlyAdded(), ts).execute()) { 587 w.put(t.getKey(), t.getValue()); 588 } 589 } catch (UnsupportedFlavorException | IOException e) { 590 Main.error(e); 584 591 } 585 592 }
Note:
See TracChangeset
for help on using the changeset viewer.