Changeset 31951 in osm for applications/editors/josm/plugins/mapillary/src/org
- Timestamp:
- 2016-01-05T16:54:55+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
r31909 r31951 139 139 */ 140 140 public void addMultiSelectedImage(Set<MapillaryAbstractImage> images) { 141 for (MapillaryAbstractImage image : images) 141 for (MapillaryAbstractImage image : images) { 142 142 if (!this.multiSelectedImages.contains(image)) { 143 if (this.getSelectedImage() != null) 143 if (this.getSelectedImage() == null) { 144 this.setSelectedImage(image); 145 } else { 144 146 this.multiSelectedImages.add(image); 145 else 146 this.setSelectedImage(image); 147 } 147 148 } 149 } 148 150 Main.map.mapView.repaint(); 149 151 } … … 237 239 if (this.listeners.isEmpty()) 238 240 return; 239 for (MapillaryDataListener lis : this.listeners) 241 for (MapillaryDataListener lis : this.listeners) { 240 242 if (lis != null) 241 243 lis.imagesAdded(); 244 } 242 245 } 243 246 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r31840 r31951 239 239 public void setVisible(boolean visible) { 240 240 super.setVisible(visible); 241 for (MapillaryAbstractImage img : this.data.getImages()) 241 for (MapillaryAbstractImage img : this.data.getImages()) { 242 242 img.setVisible(visible); 243 } 243 244 MapillaryFilterDialog.getInstance().refresh(); 244 245 } … … 347 348 MapillaryImage image = (MapillaryImage) imageAbs; 348 349 ImageIcon icon; 349 if (!this.data.getMultiSelectedImages().contains(image)) 350 icon = MapillaryPlugin.MAP_ICON; 351 else 352 icon = MapillaryPlugin.MAP_ICON_SELECTED; 350 icon = this.data.getMultiSelectedImages().contains(image) ? MapillaryPlugin.MAP_ICON_SELECTED : MapillaryPlugin.MAP_ICON; 353 351 draw(g, image, icon, p); 354 352 if (!image.getSigns().isEmpty()) { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecord.java
r31815 r31951 77 77 if (this.position != -1) { 78 78 boolean equalSets = true; 79 for (MapillaryAbstractImage img : this.commandList.get(this.position).images) 80 if (!command.images.contains(img)) 81 equalSets = false; 82 for (MapillaryAbstractImage img : command.images) 83 if (!this.commandList.get(this.position).images.contains(img)) 84 equalSets = false; 85 if (equalSets 86 && this.commandList.get(this.position).getClass() == command 87 .getClass()) { 79 for (MapillaryAbstractImage img : this.commandList.get(this.position).images) { 80 equalSets = command.images.contains(img) && equalSets; 81 } 82 for (MapillaryAbstractImage img : command.images) { 83 equalSets = this.commandList.get(this.position).images.contains(img) && equalSets; 84 } 85 if (equalSets && this.commandList.get(this.position).getClass() == command.getClass()) { 88 86 this.commandList.get(this.position).sum(command); 89 87 fireRecordChanged(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
r31909 r31951 182 182 183 183 protected static void tooBigErrorDialog() { 184 if (!SwingUtilities.isEventDispatchThread()) { 184 if (SwingUtilities.isEventDispatchThread()) { 185 MapillaryLayer.getInstance().tempSemiautomatic = true; 186 MapillaryPlugin.setMenuEnabled(MapillaryPlugin.getDownloadViewMenu(), true); 187 JOptionPane 188 .showMessageDialog( 189 Main.parent, 190 tr("The downloaded OSM area is too big. Download mode has been changed to semiautomatic until the layer is restarted.")); 191 } else { 185 192 SwingUtilities.invokeLater(new Runnable() { 186 193 @Override … … 189 196 } 190 197 }); 191 } else {192 MapillaryLayer.getInstance().tempSemiautomatic = true;193 MapillaryPlugin.setMenuEnabled(MapillaryPlugin.getDownloadViewMenu(), true);194 JOptionPane195 .showMessageDialog(196 Main.parent,197 tr("The downloaded OSM area is too big. Download mode has been changed to semiautomatic until the layer is restarted."));198 198 } 199 199 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillarySquareDownloadManagerThread.java
r31843 r31951 76 76 while (!this.downloadExecutor.isShutdown()) { 77 77 this.downloadExecutor.execute(new MapillarySequenceDownloadThread(this.downloadExecutor, bounds, page)); 78 while (this.downloadExecutor.getQueue().remainingCapacity() == 0) 78 while (this.downloadExecutor.getQueue().remainingCapacity() == 0) { 79 79 Thread.sleep(500); 80 } 80 81 page++; 81 82 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryTrafficSignDownloadThread.java
r31843 r31951 66 66 for (int k = 0; k < rects.size(); k++) { 67 67 JsonObject data = rects.getJsonObject(k); 68 for (MapillaryAbstractImage image : MapillaryLayer.getInstance().getData().getImages()) 68 for (MapillaryAbstractImage image : MapillaryLayer.getInstance().getData().getImages()) { 69 69 if (image instanceof MapillaryImage && ((MapillaryImage) image).getKey().equals(key)) 70 70 ((MapillaryImage) image).addSign(data.getString("type")); 71 } 71 72 } 72 73 }
Note:
See TracChangeset
for help on using the changeset viewer.