Changeset 31280 in osm for applications/editors/josm/plugins/mapillary/src
- Timestamp:
- 2015-06-18T19:28:21+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/MapillaryLayer.java
r31279 r31280 7 7 import org.openstreetmap.josm.plugins.mapillary.cache.MapillaryCache; 8 8 import org.openstreetmap.josm.plugins.mapillary.downloads.MapillaryDownloader; 9 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryHistoryDialog;10 9 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryToggleDialog; 11 10 import org.openstreetmap.josm.Main; … … 67 66 public List<Bounds> bounds; 68 67 69 private MapillaryToggleDialog mtd;70 private MapillaryHistoryDialog mhd;71 68 72 69 private MouseAdapter mouseAdapter; … … 101 98 MapView.addLayerChangeListener(this); 102 99 Main.map.mapView.getEditLayer().data.addDataSetListener(this); 103 if (mtd == null) {104 if (MapillaryToggleDialog.INSTANCE == null) {105 mtd = MapillaryToggleDialog.getInstance();106 Main.map.addToggleDialog(mtd, false);107 } else108 mtd = MapillaryToggleDialog.getInstance();109 }110 if (mhd == null) {111 if (MapillaryHistoryDialog.INSTANCE == null) {112 mhd = MapillaryHistoryDialog.getInstance();113 Main.map.addToggleDialog(mhd, false);114 } else115 mhd = MapillaryHistoryDialog.getInstance();116 }117 100 } 118 101 MapillaryPlugin.setMenuEnabled(MapillaryPlugin.EXPORT_MENU, true); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31278 r31280 18 18 import org.openstreetmap.josm.plugins.Plugin; 19 19 import org.openstreetmap.josm.plugins.PluginInformation; 20 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryHistoryDialog; 20 21 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryPreferenceSetting; 21 22 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryToggleDialog; … … 104 105 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 105 106 if (oldFrame == null && newFrame != null) { // map frame added 107 Main.map.addToggleDialog(MapillaryToggleDialog.getInstance(), false); 108 Main.map.addToggleDialog(MapillaryHistoryDialog.getInstance(), false); 106 109 } 107 110 if (oldFrame != null && newFrame == null) { // map frame destroyed -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecord.java
r31278 r31280 2 2 3 3 import java.util.ArrayList; 4 5 import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage; 4 6 5 7 /** … … 45 47 public void addCommand(MapillaryCommand command) { 46 48 // Checks if it is a continuation of last command 47 if (position != -1 48 && commandList.get(position).images.equals(command.images) 49 && commandList.get(position).getClass() == command.getClass()) { 50 commandList.get(position).sum(command); 51 fireRecordChanged(); 52 return; 49 if (position != -1) { 50 boolean equalSets = true; 51 for (MapillaryAbstractImage img : commandList.get(position).images) 52 if (!command.images.contains(img)) 53 equalSets = false; 54 if (equalSets 55 && commandList.get(position).getClass() == command 56 .getClass()) { 57 commandList.get(position).sum(command); 58 fireRecordChanged(); 59 return; 60 } 53 61 } 62 // Adds the command to the las position of the list. 54 63 commandList.add(position + 1, command); 55 64 position++;
Note:
See TracChangeset
for help on using the changeset viewer.