Changeset 9454 in josm
- Timestamp:
- 2016-01-15T00:26:24+01:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r9453 r9454 28 28 * An UI widget for displaying differences in the coordinates of two 29 29 * {@link HistoryNode}s. 30 * 30 * @since 2243 31 31 */ 32 32 public class CoordinateInfoViewer extends JPanel { … … 327 327 private final Updater updater; 328 328 329 publicMapViewer(HistoryBrowserModel model) {329 MapViewer(HistoryBrowserModel model) { 330 330 this.updater = new Updater(model, PointInTimeType.REFERENCE_POINT_IN_TIME); 331 331 setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY)); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r9403 r9454 105 105 referenceRelationMemberTableModel = new DiffTableModel(); 106 106 107 OsmDataLayer editLayer = Main.main.getEditLayer(); 108 if (editLayer != null) { 109 editLayer.data.addDataSetListener(this); 107 if (Main.main != null) { 108 OsmDataLayer editLayer = Main.main.getEditLayer(); 109 if (editLayer != null) { 110 editLayer.data.addDataSetListener(this); 111 } 110 112 } 111 113 MapView.addLayerChangeListener(this); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r9284 r9454 63 63 import org.openstreetmap.josm.gui.mappaint.StyleElementList; 64 64 import org.openstreetmap.josm.gui.mappaint.styleelement.MapImage; 65 import org.openstreetmap.josm.gui.mappaint.styleelement.NodeElement; 65 66 import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement; 66 67 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset; … … 81 82 import com.kitfox.svg.SVGDiagram; 82 83 import com.kitfox.svg.SVGUniverse; 83 import org.openstreetmap.josm.gui.mappaint.styleelement.NodeElement;84 84 85 85 /** … … 1057 1057 } 1058 1058 // Try user-data directory 1059 String dir = new File(Main.pref.getUserDataDirectory(), "images").getAbsolutePath(); 1060 try { 1061 u = getImageUrl(dir, imageName, additionalClassLoaders); 1062 if (u != null) 1063 return u; 1064 } catch (SecurityException e) { 1065 Main.warn(tr( 1066 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e 1067 .toString())); 1059 if (Main.pref != null) { 1060 String dir = new File(Main.pref.getUserDataDirectory(), "images").getAbsolutePath(); 1061 try { 1062 u = getImageUrl(dir, imageName, additionalClassLoaders); 1063 if (u != null) 1064 return u; 1065 } catch (SecurityException e) { 1066 Main.warn(tr( 1067 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e 1068 .toString())); 1069 } 1068 1070 } 1069 1071 … … 1079 1081 1080 1082 // Try all other resource directories 1081 for (String location : Main.pref.getAllPossiblePreferenceDirs()) { 1082 u = getImageUrl(location + "images", imageName, additionalClassLoaders); 1083 if (u != null) 1084 return u; 1085 u = getImageUrl(location, imageName, additionalClassLoaders); 1086 if (u != null) 1087 return u; 1083 if (Main.pref != null) { 1084 for (String location : Main.pref.getAllPossiblePreferenceDirs()) { 1085 u = getImageUrl(location + "images", imageName, additionalClassLoaders); 1086 if (u != null) 1087 return u; 1088 u = getImageUrl(location, imageName, additionalClassLoaders); 1089 if (u != null) 1090 return u; 1091 } 1088 1092 } 1089 1093
Note:
See TracChangeset
for help on using the changeset viewer.