Ignore:
Timestamp:
2016-06-25T11:56:57+02:00 (10 years ago)
Author:
donvip
Message:

checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadChosenRelationAction.java

    r32395 r32398  
    3131
    3232    public DownloadChosenRelationAction(ChosenRelation rel) {
    33         super();
    34         //        putValue(NAME, "D");
    3533        putValue(SMALL_ICON, ImageProvider.get("relcontext", "download"));
    3634        putValue(SHORT_DESCRIPTION, tr("Download incomplete members for the chosen relation"));
     
    4341    public void actionPerformed(ActionEvent e) {
    4442        Relation relation = rel.get();
    45         if (relation == null || relation.isNew() ) return;
     43        if (relation == null || relation.isNew()) return;
    4644        int total = relation.getMembersCount();
    4745        int incomplete = relation.getIncompleteMembers().size();
    48         //        if (incomplete <= 5 || (incomplete <= 10 && incomplete * 3 < total) )
    49         if (incomplete <= 10 && incomplete * 3 < total ) {
     46        if (incomplete <= 10 && incomplete * 3 < total) {
    5047            downloadIncomplete(relation);
    5148        } else {
     
    7067    protected void downloadMembers(Relation rel) {
    7168        if (!rel.isNew()) {
    72             Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.main.getEditLayer()));
     69            Main.worker.submit(new DownloadRelationTask(Collections.singletonList(rel), Main.getLayerManager().getEditLayer()));
    7370        }
    7471    }
    7572
    7673    protected void downloadIncomplete(Relation rel) {
    77         if (rel.isNew() ) return;
     74        if (rel.isNew()) return;
    7875        Set<OsmPrimitive> ret = new HashSet<>();
    7976        ret.addAll(rel.getIncompleteMembers());
    80         if (ret.isEmpty() ) return;
    81         Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.main.getEditLayer()));
     77        if (ret.isEmpty()) return;
     78        Main.worker.submit(new DownloadRelationMemberTask(Collections.singletonList(rel), ret, Main.getLayerManager().getEditLayer()));
    8279    }
    8380}
Note: See TracChangeset for help on using the changeset viewer.