Changeset 31452 in osm
- Timestamp:
- 2015-08-05T11:46:07+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
r31450 r31452 3 3 import org.openstreetmap.josm.Main; 4 4 import org.openstreetmap.josm.plugins.mapillary.cache.Utils; 5 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 5 6 6 7 import java.util.ArrayList; … … 35 36 36 37 addListener(MapillaryPlugin.walkAction); 38 addListener(MapillaryPlugin.zoomAction); 39 addListener(MapillaryPlugin.uploadAction); 40 addListener(MapillaryMainDialog.getInstance()); 37 41 } 38 42 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31445 r31452 53 53 /** Import action */ 54 54 public static MapillaryImportAction importAction; 55 private final MapillaryZoomAction zoomAction; 55 /** Zoom action */ 56 public static MapillaryZoomAction zoomAction; 56 57 private final MapillaryDownloadViewAction downloadViewAction; 57 58 private final MapillaryImportIntoSequenceAction importIntoSequenceAction; … … 59 60 /** Walk action */ 60 61 public static MapillaryWalkAction walkAction; 61 private final MapillaryUploadAction uploadAction; 62 /** Upload action */ 63 public static MapillaryUploadAction uploadAction; 62 64 63 65 /** Menu button for the {@link MapillaryDownloadAction} action. */ … … 100 102 this.exportAction = new MapillaryExportAction(); 101 103 importAction = new MapillaryImportAction(); 102 this.zoomAction = new MapillaryZoomAction();104 zoomAction = new MapillaryZoomAction(); 103 105 this.downloadViewAction = new MapillaryDownloadViewAction(); 104 106 this.importIntoSequenceAction = new MapillaryImportIntoSequenceAction(); 105 107 this.joinAction = new MapillaryJoinAction(); 106 this.uploadAction = new MapillaryUploadAction();108 uploadAction = new MapillaryUploadAction(); 107 109 108 110 if (Main.main != null) { // important for headless mode … … 115 117 IMPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, importAction, false, 116 118 14); 117 UPLOAD_MENU = MainMenu.add(Main.main.menu.fileMenu, this.uploadAction,119 UPLOAD_MENU = MainMenu.add(Main.main.menu.fileMenu, uploadAction, 118 120 false, 14); 119 ZOOM_MENU = MainMenu.add(Main.main.menu.viewMenu, this.zoomAction, false,121 ZOOM_MENU = MainMenu.add(Main.main.menu.viewMenu, zoomAction, false, 120 122 15); 121 123 DOWNLOAD_VIEW_MENU = MainMenu.add(Main.main.menu.fileMenu, -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java
r31451 r31452 38 38 Shortcut.NONE), false, "mapillaryUpload", false); 39 39 this.setEnabled(false); 40 MapillaryLayer.getInstance().getData().addListener(this);41 40 } 42 41 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryWalkAction.java
r31445 r31452 60 60 fireWalkStarted(); 61 61 this.thread.start(); 62 MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.M ode.WALK);62 MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.MODE.WALK); 63 63 } 64 64 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryZoomAction.java
r31451 r31452 35 35 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false, "mapillaryZoom", 36 36 false); 37 MapillaryLayer.getInstance().getData().addListener(this);38 37 this.setEnabled(false); 39 38 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java
r31451 r31452 196 196 this.data.removeListener(this); 197 197 MapillaryMainDialog.getInstance() 198 .setMode(MapillaryMainDialog.M ode.NORMAL);198 .setMode(MapillaryMainDialog.MODE.NORMAL); 199 199 } 200 200 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
r31451 r31452 76 76 * 77 77 */ 78 public static enum M ode{78 public static enum MODE { 79 79 /** Standard mode to view pictures. */ 80 80 NORMAL, … … 96 96 tr("Open Mapillary main dialog"), KeyEvent.VK_M, Shortcut.NONE), 97 97 200, false, MapillaryPreferenceSetting.class); 98 MapillaryLayer.getInstance().getData().addListener(this);99 98 addShortcuts(); 100 99 this.mapillaryImageDisplay = new MapillaryImageDisplay(); … … 148 147 * The mode to be set. 149 148 */ 150 public void setMode(M odemode) {149 public void setMode(MODE mode) { 151 150 switch (mode) { 152 151 case NORMAL: … … 166 165 } 167 166 disableAllButtons(); 167 if (mode.equals(MODE.NORMAL)) 168 updateImage(); 168 169 169 170 }
Note:
See TracChangeset
for help on using the changeset viewer.