Changeset 32738 in osm for applications/editors


Ignore:
Timestamp:
2016-07-28T23:12:29+02:00 (8 years ago)
Author:
donvip
Message:

update to JOSM 10657

Location:
applications/editors/josm/plugins/FastDraw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/build.xml

    r32680 r32738  
    44    <property name="commit.message" value="[josm_fastdraw] Fix incorrect settings saving-2"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="10657"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java

    r32548 r32738  
    2121import org.openstreetmap.josm.Main;
    2222import org.openstreetmap.josm.gui.ExtendedDialog;
     23import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
    2324import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    2425import org.openstreetmap.josm.tools.GBC;
    2526import org.openstreetmap.josm.tools.ImageProvider;
    2627import org.openstreetmap.josm.tools.TextTagParser;
    27 import org.openstreetmap.josm.tools.Utils;
    2828
    2929public class FastDrawConfigDialog extends ExtendedDialog {
     
    5757            @Override
    5858            public void actionPerformed(ActionEvent e) {
    59                 String s = Utils.getClipboardContent();
     59                String s = ClipboardUtils.getClipboardStringContent();
    6060                if (TextTagParser.getValidatedTagsFromText(s) != null) {
    6161                    addTags.setText(s);
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r32548 r32738  
    88import java.awt.Graphics2D;
    99import java.awt.Point;
     10import java.awt.datatransfer.UnsupportedFlavorException;
    1011import java.awt.event.KeyEvent;
    1112import java.awt.event.MouseEvent;
     13import java.io.IOException;
    1214import java.util.ArrayList;
    1315import java.util.Collection;
     
    3840import org.openstreetmap.josm.gui.MapFrame;
    3941import org.openstreetmap.josm.gui.MapView;
     42import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
     43import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData;
    4044import org.openstreetmap.josm.gui.layer.Layer;
    4145import org.openstreetmap.josm.gui.layer.MapViewPaintable;
     
    578582            Set<OsmPrimitive> ts = new HashSet<>();
    579583            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);
    584591            }
    585592        }
Note: See TracChangeset for help on using the changeset viewer.