Changeset 8937 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2015-10-24T00:54:52+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r8512 r8937 11 11 import java.util.Arrays; 12 12 import java.util.Collection; 13 import java.util.Collections; 13 14 import java.util.HashSet; 14 15 import java.util.LinkedList; … … 266 267 } 267 268 } 268 if (Main.isDebugEnabled() ) {269 if (Main.isDebugEnabled() || !source.getErrors().isEmpty()) { 269 270 final long elapsedTime = System.currentTimeMillis() - startTime; 270 Main.debug("Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime)); 271 String message = "Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime); 272 if (!source.getErrors().isEmpty()) { 273 Main.warn(message + " (" + source.getErrors().size() + " errors)"); 274 } else { 275 Main.debug(message); 276 } 271 277 } 272 278 } … … 433 439 } 434 440 435 public static void addStyle(SourceEntry entry) { 441 /** 442 * Add a new map paint style. 443 * @param entry map paint style 444 * @return list of errors that occured during loading 445 */ 446 public static Collection<Throwable> addStyle(SourceEntry entry) { 436 447 StyleSource source = fromSourceEntry(entry); 437 448 if (source != null) { … … 441 452 fireMapPaintSylesUpdated(); 442 453 styles.clearCached(); 443 Main.map.mapView.repaint(); 444 } 454 if (Main.isDisplayingMapView()) { 455 Main.map.mapView.repaint(); 456 } 457 return source.getErrors(); 458 } 459 return Collections.emptyList(); 445 460 } 446 461 -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
r8926 r8937 83 83 public static final String OPTIONAL_TOOLTIP_TEXT = "Optional tooltip text"; 84 84 85 /** Prefix of preset icon loading failure error message */ 86 public static final String PRESET_ICON_ERROR_MSG_PREFIX = "Could not get presets icon "; 87 85 88 public TaggingPresetMenu group; 86 89 public String name; … … 166 169 * Called from the XML parser to set the icon. 167 170 * The loading task is performed in the background in order to speedup startup. 171 * @param iconName icon name 168 172 */ 169 173 public void setIcon(final String iconName) { … … 190 194 }); 191 195 } else { 192 Main.warn( "Could not get presets icon "+ iconName);196 Main.warn(PRESET_ICON_ERROR_MSG_PREFIX + iconName); 193 197 } 194 198 }
Note:
See TracChangeset
for help on using the changeset viewer.