Ignore:
Timestamp:
2009-12-25T10:35:36+01:00 (15 years ago)
Author:
stoecker
Message:

fixed josm bug 4232

Location:
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/PlayAudioAction.java

    r13497 r19211  
    4343                    if(audioSource == null) {
    4444                        audioSource = getParameters().get(0);
    45                         System.out.println("reading audio from " + audioSource);
     45                        //System.out.println("reading audio from " + audioSource);
    4646                    }
    4747                    InputStream in = new BufferedInputStream(ResourceLoader.getInputStream(audioSource));
     
    8686                }
    8787            }
    88 
    8988        });
    90 
    9189    }
    9290}
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java

    r18427 r19211  
    1515import org.openstreetmap.josm.Main;
    1616import org.openstreetmap.josm.data.coor.LatLon;
     17import org.openstreetmap.josm.data.osm.DataSet;
    1718import org.openstreetmap.josm.data.osm.Node;
    1819
     
    6364    public void actionPerformed(GpsActionEvent event) {
    6465        LatLon coordinates = event.getCoordinates();
    65         System.out.println(getClass().getSimpleName() + " KOORD: " + coordinates.lat() + ", " + coordinates.lon() + " params: " + keyValues);
     66        //System.out.println(getClass().getSimpleName() + " KOORD: " + coordinates.lat() + ", " + coordinates.lon() + " params: " + keyValues);
    6667        Node node = new Node(coordinates);
    6768        for(Entry<String, String> entry : keyValues) {
    6869            node.put(entry.getKey(), entry.getValue());
    6970        }
    70         node.put("created_by", "JOSM-surveyor-plugin");
    7171        synchronized(LiveGpsLock.class) {
    72             Main.map.mapView.getEditLayer().data.addPrimitive(node);
    73             Main.main.getCurrentDataSet().setSelected(node);
     72            DataSet ds = Main.main.getCurrentDataSet();
     73            if(ds != null)
     74            {
     75                ds.addPrimitive(node);
     76                ds.setSelected(node);
     77            }
    7478        }
    7579        Main.map.repaint();
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java

    r16948 r19211  
    3838    private LiveGpsLayer liveGpsLayer;
    3939    private MarkerLayer markerLayer;
    40     public static final String MARKER_LAYER_NAME = "surveyorwaypointlayer";
     40    public static final String MARKER_LAYER_NAME = tr("Surveyor waypoint layer");
    4141    private WaypointDialog dialog;
    4242
     
    5454    public void actionPerformed(GpsActionEvent event) {
    5555        LatLon coordinates = event.getCoordinates();
    56         System.out.println(getClass().getSimpleName() + " KOORD: " + coordinates.lat() + ", " + coordinates.lon());
     56        //System.out.println(getClass().getSimpleName() + " KOORD: " + coordinates.lat() + ", " + coordinates.lon());
    5757        String markerTitle = getParameters().get(0);
    5858        Object source = event.getSource();
     
    7070
    7171        String markerText = markerTitle;
    72         String inputText = dialog.openDialog(SurveyorPlugin.getSurveyorFrame(), "Waypoint Description");
     72        String inputText = dialog.openDialog(SurveyorPlugin.getSurveyorFrame(), tr("Waypoint Description"));
    7373        if(inputText != null && inputText.length() > 0) {
    7474            inputText = inputText.replaceAll("<", "_"); // otherwise the gpx file is ruined
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/WaypointDialog.java

    r13497 r19211  
    6868
    6969
    70         System.out.println("value: " + optionPane.getValue());
     70        //System.out.println("value: " + optionPane.getValue());
    7171        return textField.getText();
    7272
Note: See TracChangeset for help on using the changeset viewer.