Changeset 4154 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2011-06-21T17:16:51+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/relation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
r3530 r4154 41 41 public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer, Dialog dialog) { 42 42 super(tr("Download relation members"), new PleaseWaitProgressMonitor(dialog), false /* don't ignore exception */); 43 this.parents.add(parent); 43 if(parent != null) 44 this.parents.add(parent); 44 45 this.children = children; 45 46 this.curLayer = curLayer; … … 48 49 public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer) { 49 50 super(tr("Download relation members"), false /* don't ignore exception */); 50 this.parents.add(parent); 51 if(parent != null) 52 this.parents.add(parent); 51 53 this.children = children; 52 54 this.curLayer = curLayer; … … 89 91 90 92 protected String buildDownloadFeedbackMessage() { 91 if (parents.size() == 1) { 93 if (parents.size() == 0) { 94 return trn("Downloading {0} incomplete object", 95 "Downloading {0} incomplete objects", 96 children.size(), 97 children.size()); 98 } else if (parents.size() == 1) { 92 99 Relation parent = parents.iterator().next(); 93 100 return trn("Downloading {0} incomplete child of relation ''{1}''", … … 95 102 children.size(), 96 103 children.size(), 97 parent.getDisplayName(DefaultNameFormatter.getInstance()) 98 ); 99 } else 104 parent.getDisplayName(DefaultNameFormatter.getInstance())); 105 } else { 100 106 return trn("Downloading {0} incomplete child of {1} parent relations", 101 107 "Downloading {0} incomplete children of {1} parent relations", 102 108 children.size(), 103 109 children.size(), 104 parents.size() 105 );110 parents.size()); 111 } 106 112 } 107 113 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r4120 r4154 1317 1317 1318 1318 protected void updateEnabledState() { 1319 setEnabled( 1320 getRelation() != null 1321 && memberTableModel.hasIncompleteMembers() 1322 ); 1319 setEnabled(memberTableModel.hasIncompleteMembers()); 1323 1320 } 1324 1321 … … 1350 1347 1351 1348 protected void updateEnabledState() { 1352 setEnabled( 1353 getRelation() != null 1354 && memberTableModel.hasIncompleteSelectedMembers() 1355 ); 1349 setEnabled(memberTableModel.hasIncompleteSelectedMembers()); 1356 1350 } 1357 1351
Note:
See TracChangeset
for help on using the changeset viewer.