Changeset 215 in josm for src/org/openstreetmap/josm/gui


Ignore:
Timestamp:
2007-04-06T15:44:54+02:00 (18 years ago)
Author:
imi
Message:
  • fixed NPE in marker layer when marker type was not found
  • added one zoom to->data when first opening some data (since auto scale feature has been removed)
  • fixed NPE in preferences when there is a .jar without a manifest in plugin directory
Location:
src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/MapView.java

    r214 r215  
    1616
    1717import org.openstreetmap.josm.Main;
     18import org.openstreetmap.josm.actions.AutoScaleAction;
    1819import org.openstreetmap.josm.data.Bounds;
    1920import org.openstreetmap.josm.data.SelectionChangedListener;
     
    7374                addComponentListener(new ComponentAdapter(){
    7475                        @Override public void componentResized(ComponentEvent e) {
    75                                 recalculateCenterScale(null);
     76                                new AutoScaleAction("data").actionPerformed(null);
    7677                                removeComponentListener(this);
    7778                        }
  • src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r210 r215  
    7575
    7676                                // Try a relative file:// url, if the link is not in an URL-compatible form
    77                                 if (relativePath != null && !URI.isWellFormedAddress(link))
     77                                if (relativePath != null && link != null && !URI.isWellFormedAddress(link))
    7878                                        link = new File(relativePath, link).toURI().toString();
    7979
  • src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r181 r215  
    2121
    2222import org.openstreetmap.josm.Main;
     23import org.openstreetmap.josm.plugins.PluginException;
    2324import org.openstreetmap.josm.plugins.PluginInformation;
    2425import org.openstreetmap.josm.tools.GBC;
     
    3637                if (pluginFiles != null) {
    3738                        Arrays.sort(pluginFiles);
    38                         for (File f : pluginFiles)
    39                                 if (f.isFile() && f.getName().endsWith(".jar"))
    40                                         availablePlugins.add(new PluginInformation(f));
     39                        for (File f : pluginFiles) {
     40                                if (f.isFile() && f.getName().endsWith(".jar")) {
     41                                        try {
     42                            availablePlugins.add(new PluginInformation(f));
     43                    } catch (PluginException x) {
     44                    }
     45                                }
     46                        }
    4147                }
    4248
Note: See TracChangeset for help on using the changeset viewer.