Changeset 3106 in josm


Ignore:
Timestamp:
2010-03-10T18:51:45+01:00 (14 years ago)
Author:
mjulius
Message:

fix issue that when plugins are updated only the updated plugins are loaded. - don't modify list of plugins in PluginHandler.updatePlugins()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r3090 r3106  
    650650            // filter plugins which actually have to be updated
    651651            //
    652             Iterator<PluginInformation> it = plugins.iterator();
    653             while(it.hasNext()) {
    654                 PluginInformation pi = it.next();
    655                 if (!pi.isUpdateRequired()) {
    656                     it.remove();
     652            Collection<PluginInformation> pluginsToUpdate = new ArrayList<PluginInformation>();
     653            for(PluginInformation pi: plugins) {
     654                if (pi.isUpdateRequired()) {
     655                    pluginsToUpdate.add(pi);
    657656                }
    658657            }
    659658
    660             if (!plugins.isEmpty()) {
     659            if (!pluginsToUpdate.isEmpty()) {
    661660                // try to update the locally installed plugins
    662661                //
    663662                PluginDownloadTask task2 = new PluginDownloadTask(
    664663                        monitor.createSubTaskMonitor(1,false),
    665                         plugins,
     664                        pluginsToUpdate,
    666665                        tr("Update plugins")
    667666                );
     
    672671                } catch(ExecutionException e) {
    673672                    e.printStackTrace();
    674                     alertFailedPluginUpdate(parent, plugins);
     673                    alertFailedPluginUpdate(parent, pluginsToUpdate);
    675674                    return;
    676675                } catch(InterruptedException e) {
    677676                    e.printStackTrace();
    678                     alertFailedPluginUpdate(parent, plugins);
     677                    alertFailedPluginUpdate(parent, pluginsToUpdate);
    679678                    return;
    680679                }
Note: See TracChangeset for help on using the changeset viewer.