Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
r8444 r8510 46 46 * constructor 47 47 */ 48 public RelationTree(){ 48 public RelationTree() { 49 49 super(); 50 50 build(); … … 67 67 protected Dialog getParentDialog() { 68 68 Component c = RelationTree.this; 69 while(c != null && !(c instanceof Dialog)) { 69 while (c != null && !(c instanceof Dialog)) { 70 70 c = c.getParent(); 71 71 } 72 return (Dialog)c; 72 return (Dialog) c; 73 73 } 74 74 … … 89 89 public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException { 90 90 TreePath path = event.getPath(); 91 Relation parent = (Relation)event.getPath().getLastPathComponent(); 91 Relation parent = (Relation) event.getPath().getLastPathComponent(); 92 92 if (!parent.isIncomplete() || parent.isNew()) 93 93 // we don't load complete or new relations 94 94 return; 95 95 // launch the download task 96 // 97 Main.worker.submit(new RelationLoader(getParentDialog(),parent, path)); 96 Main.worker.submit(new RelationLoader(getParentDialog(), parent, path)); 98 97 } 99 98 } … … 121 120 this.path = path; 122 121 } 122 123 123 @Override 124 124 protected void cancel() { … … 140 140 Main.main.getEditLayer().getConflicts().add(visitor.getConflicts()); 141 141 } 142 final RelationTreeModel model = (RelationTreeModel)getModel(); 142 final RelationTreeModel model = (RelationTreeModel) getModel(); 143 143 SwingUtilities.invokeLater( 144 144 new Runnable() { … … 157 157 ds = reader.parseOsm(progressMonitor 158 158 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 159 } catch(Exception e) { 159 } catch (Exception e) { 160 160 if (canceled) { 161 161 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Note:
See TracChangeset
for help on using the changeset viewer.
