Changeset 2779 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
- Timestamp:
- 2010-01-08T22:15:11+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
r2512 r2779 28 28 private PropertyChangeSupport support; 29 29 private boolean showTagsWithConflictsOnly = false; 30 private boolean showTagsWithMultiValuesOnly = false; 30 31 31 32 public TagConflictResolverModel() { … … 91 92 if (showTagsWithConflictsOnly) { 92 93 keys.retainAll(keysWithConflicts); 94 if (showTagsWithMultiValuesOnly) { 95 Set<String> keysWithMultiValues = new HashSet<String>(); 96 for (String key: keys) { 97 if (decisions.get(key).canKeepAll()) { 98 keysWithMultiValues.add(key); 99 } 100 } 101 keys.retainAll(keysWithMultiValues); 102 } 93 103 for (String key: tags.getKeys()) { 94 104 if (!decisions.get(key).isDecided() && !keys.contains(key)) { … … 144 154 MultiValueDecisionType type = (MultiValueDecisionType)value; 145 155 switch(type) { 146 147 148 149 150 151 156 case KEEP_NONE: 157 decision.keepNone(); 158 break; 159 case KEEP_ALL: 160 decision.keepAll(); 161 break; 152 162 } 153 163 } … … 193 203 public void setShowTagsWithConflictsOnly(boolean showTagsWithConflictsOnly) { 194 204 this.showTagsWithConflictsOnly = showTagsWithConflictsOnly; 205 rebuild(); 206 } 207 208 /** 209 * Sets whether all conflicts or only conflicts with multiple values are displayed 210 * 211 * @param showTagsWithMultiValuesOnly if true, only tags with multiple values are displayed 212 */ 213 public void setShowTagsWithMultiValuesOnly(boolean showTagsWithMultiValuesOnly) { 214 this.showTagsWithMultiValuesOnly = showTagsWithMultiValuesOnly; 195 215 rebuild(); 196 216 }
Note:
See TracChangeset
for help on using the changeset viewer.