Changeset 32395 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
- Timestamp:
- 2016-06-24T09:10:57+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
r30737 r32395 1 // License: GPL. For details, see LICENSE file. 1 2 package relcontext.actions; 2 3 … … 25 26 /** 26 27 * Downloads parent relations for this relation and all parent objects for its members. 27 * 28 * 28 29 * @author Zverik 29 30 */ … … 31 32 private ChosenRelation rel; 32 33 33 public DownloadParentsAction( ChosenRelation rel) {34 public DownloadParentsAction(ChosenRelation rel) { 34 35 super(tr("Download referrers")); 35 36 putValue(SMALL_ICON, ImageProvider.get("download")); … … 40 41 } 41 42 42 public void actionPerformed( ActionEvent e ) { 43 @Override 44 public void actionPerformed(ActionEvent e) { 43 45 Relation relation = rel.get(); 44 if (relation == null ) return;46 if (relation == null ) return; 45 47 List<OsmPrimitive> objects = new ArrayList<>(); 46 48 objects.add(relation); … … 49 51 } 50 52 51 public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) { 53 @Override 54 public void chosenRelationChanged(Relation oldRelation, Relation newRelation) { 52 55 setEnabled(newRelation != null && Main.main.getEditLayer() != null); 53 56 } 54 57 55 protected void downloadMembers( Relation rel) {56 if (!rel.isNew()) {58 protected void downloadMembers(Relation rel) { 59 if (!rel.isNew()) { 57 60 Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.main.getEditLayer())); 58 61 } 59 62 } 60 63 61 protected void downloadIncomplete( Relation rel) {62 if (rel.isNew() ) return;64 protected void downloadIncomplete(Relation rel) { 65 if (rel.isNew() ) return; 63 66 Set<OsmPrimitive> ret = new HashSet<>(); 64 67 ret.addAll(rel.getIncompleteMembers()); 65 if (ret.isEmpty() ) return;68 if (ret.isEmpty() ) return; 66 69 Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.main.getEditLayer())); 67 70 }
Note:
See TracChangeset
for help on using the changeset viewer.
