Changeset 29771 in osm for applications/editors/josm/plugins/waydownloader/src
- Timestamp:
- 2013-07-24T21:45:09+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java
r27852 r29771 47 47 super(info); 48 48 //add WayDownloadAction to tools menu 49 MainMenu.add(Main.main.menu. toolsMenu, new WayDownloadAction());49 MainMenu.add(Main.main.menu.moreToolsMenu, new WayDownloadAction()); 50 50 } 51 51 … … 92 92 93 93 /** Called when the WayDownloadAction action is triggered (e.g. user clicked the menu option) */ 94 @Override 94 95 public void actionPerformed(ActionEvent e) { 95 96 selectedNode = null; 96 97 Collection<Node> selection = Main.main.getCurrentDataSet().getSelectedNodes(); 97 if (selection. size()==0) {98 if (selection.isEmpty()) { 98 99 Collection<Way> selWays = Main.main.getCurrentDataSet().getSelectedWays(); 99 100 if (!workFromWaySelection(selWays)) { … … 104 105 } 105 106 106 if ( selection. size()==0|| selection.size()>1 || ! (selection.iterator().next() instanceof Node)) {107 if ( selection.isEmpty() || selection.size()>1 || ! (selection.iterator().next() instanceof Node)) { 107 108 showWarningMessage(tr("<html>Could not find a unique node to start downloading from.</html>")); 108 109 return; … … 115 116 //Find connected way 116 117 List<Way> connectedWays = findConnectedWays(selectedNode); 117 if (connectedWays. size()==0) {118 if (connectedWays.isEmpty()) { 118 119 showWarningMessage( 119 120 tr("<html>There are no ways connected to node ''{0}''. Aborting.</html>", … … 143 144 Main.worker.submit( 144 145 new Runnable() { 146 @Override 145 147 public void run() { 146 148 try { … … 162 164 * Logic to excute after the download has happened 163 165 */ 166 @Override 164 167 public void run() { 165 168 //Find ways connected to the node after the download 166 169 List<Way> connectedWays = findConnectedWays(selectedNode); 167 170 168 if (connectedWays. size()==0) {171 if (connectedWays.isEmpty()) { 169 172 String msg = tr("Way downloader data inconsistency. Prior connected way ''{0}'' wasn''t discovered after download", 170 173 priorConnectedWay.getDisplayName(DefaultNameFormatter.getInstance())
Note:
See TracChangeset
for help on using the changeset viewer.
