Changeset 7254 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r7100 r7254 70 70 /** 71 71 * Reads the presets data. 72 *73 72 */ 74 public void initializePresets() { 73 public static synchronized void initializePresets() { 74 if (!relationpresets.isEmpty()) { 75 // the presets have already been initialized 76 return; 77 } 75 78 for (TaggingPreset p : TaggingPresets.getTaggingPresets()) { 76 79 for (TaggingPresetItem i : p.data) { -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r7171 r7254 170 170 171 171 public boolean required = false; 172 p ubliclong count = 0;172 private long count = 0; 173 173 174 174 public void setType(String types) throws SAXException { … … 191 191 } 192 192 193 /* return either argument, the highest possible value or the lowest 194 allowed value */ 195 public long getValidCount(long c) 196 { 197 if(count > 0 && !required) 193 public void setCount(String count) { 194 this.count = Long.parseLong(count); 195 } 196 197 /** 198 * Return either argument, the highest possible value or the lowest allowed value 199 */ 200 public long getValidCount(long c) { 201 if (count > 0 && !required) 198 202 return c != 0 ? count : 0; 199 else if (count > 0)203 else if (count > 0) 200 204 return count; 201 else if (!required)202 return c != 0 205 else if (!required) 206 return c != 0 ? c : 0; 203 207 else 204 return c != 0 ? c : 1; 205 } 208 return c != 0 ? c : 1; 209 } 210 206 211 public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel) { 207 212 String cstring;
Note:
See TracChangeset
for help on using the changeset viewer.