Changeset 32658 in osm for applications/editors/josm/plugins/mapillary/src/org
- Timestamp:
- 2016-07-15T15:25:10+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
r32652 r32658 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.mapillary.io.download; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.util.ArrayList; … … 38 36 private String label; 39 37 40 privateDOWNLOAD_MODE(String prefId, String label) {38 DOWNLOAD_MODE(String prefId, String label) { 41 39 this.prefId = prefId; 42 40 this.label = label; … … 63 61 return getDefault(); 64 62 } 63 65 64 public static DOWNLOAD_MODE fromLabel(String label) { 66 65 if (MANUAL_ONLY.getLabel().equals(label)) { … … 197 196 */ 198 197 public static void automaticDownload() { 199 MapillaryLayer layer = MapillaryLayer.getInstance();200 if (Main.getLayerManager().getEditLayer() == null)201 return;198 if (Main.getLayerManager().getEditLayer() == null) { 199 return; 200 } 202 201 if (isAreaTooBig()) { 203 202 tooBigErrorDialog(); 204 203 return; 205 204 } 206 if (getMode() != DOWNLOAD_MODE.OSM_AREA) 205 if (getMode() != DOWNLOAD_MODE.OSM_AREA) { 207 206 throw new IllegalStateException("Must be in automatic mode."); 208 for (Bounds bounds : Main.getLayerManager().getEditLayer().data209 210 if (! layer.getData().getBounds().contains(bounds)) {211 layer.getData().getBounds().add(bounds);207 } 208 for (Bounds bounds : Main.getLayerManager().getEditLayer().data.getDataSourceBounds()) { 209 if (!MapillaryLayer.getInstance().getData().getBounds().contains(bounds)) { 210 MapillaryLayer.getInstance().getData().getBounds().add(bounds); 212 211 MapillaryDownloader.getImages(bounds.getMin(), bounds.getMax()); 213 212 } … … 236 235 .showMessageDialog( 237 236 Main.parent, 238 tr("The downloaded OSM area is too big. Download mode has been changed to semiautomatic until the layer is restarted.")); 237 I18n.tr("The downloaded OSM area is too big. Download mode has been changed to semiautomatic until the layer is restarted.")); 239 238 } else { 240 239 SwingUtilities.invokeLater( new Runnable() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/SelectMode.java
r32589 r32658 33 33 */ 34 34 public class SelectMode extends AbstractMode { 35 private Point start;36 35 private MapillaryAbstractImage closest; 37 36 private MapillaryAbstractImage lastClicked; … … 67 66 } 68 67 } 69 this.start = e.getPoint();70 68 this.lastClicked = this.closest; 71 69 this.closest = closest; … … 109 107 for (MapillaryAbstractImage img : data.getMultiSelectedImages()) { 110 108 if (Main.pref.getBoolean("mapillary.developer") || !(img instanceof MapillaryImage)) { 111 img.turn(Math.toDegrees(Math.atan2( (e.getX() - highlightImgPoint.getX()), -(e.getY()-highlightImgPoint.getY()))) - highlightImg.getTempCa());109 img.turn(Math.toDegrees(Math.atan2(e.getX() - highlightImgPoint.getX(), -e.getY() + highlightImgPoint.getY())) - highlightImg.getTempCa()); 112 110 } 113 111 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java
r32575 r32658 111 111 dlg.setVisible(true); 112 112 } else { 113 SwingUtilities.invokeLater( 113 SwingUtilities.invokeLater(new Runnable() { 114 114 @Override 115 115 public void run() { 116 116 finishedUploadDialog(); 117 117 } 118 } 118 }); 119 119 } 120 120 } 121 121 122 public static void notLoggedInToMapillaryDialog() { 122 123 if (Main.main == null) {
Note:
See TracChangeset
for help on using the changeset viewer.