Changeset 1465 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2009-03-07T13:40:54+01:00 (16 years ago)
Author:
stoecker
Message:

fix #1967. patch by xeen. This will break plugins using ProgressDialog until recompiled

Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
9 edited

Legend:

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

    r1403 r1465  
    1616import java.util.Map;
    1717import java.util.StringTokenizer;
    18 import java.util.concurrent.Executor;
     18import java.util.concurrent.ExecutorService;
    1919import java.util.concurrent.Executors;
    2020import java.util.regex.Matcher;
     
    2727import javax.swing.UIManager;
    2828
     29import org.openstreetmap.josm.actions.SaveAction;
    2930import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask;
    3031import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
    3132import org.openstreetmap.josm.actions.mapmode.MapMode;
    32 import org.openstreetmap.josm.actions.SaveAction;
    3333import org.openstreetmap.josm.actions.search.SearchAction;
    3434import org.openstreetmap.josm.data.Bounds;
     
    5555import org.openstreetmap.josm.tools.OsmUrlToBounds;
    5656import org.openstreetmap.josm.tools.PlatformHook;
     57import org.openstreetmap.josm.tools.PlatformHookOsx;
    5758import org.openstreetmap.josm.tools.PlatformHookUnixoid;
    5859import org.openstreetmap.josm.tools.PlatformHookWindows;
    59 import org.openstreetmap.josm.tools.PlatformHookOsx;
    6060import org.openstreetmap.josm.tools.Shortcut;
    6161
     
    7474     * and sequential.
    7575     */
    76     public final static Executor worker = Executors.newSingleThreadExecutor();
     76    public final static ExecutorService worker = Executors.newSingleThreadExecutor();
    7777    /**
    7878     * Global application preferences
  • trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java

    r1464 r1465  
    77import java.awt.event.KeyEvent;
    88import java.awt.geom.Area;
    9 import java.awt.geom.Rectangle2D;
    109import java.util.ArrayList;
    1110import java.util.List;
     
    1413
    1514import org.openstreetmap.josm.Main;
    16 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
     15import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTaskList;
    1716import org.openstreetmap.josm.data.osm.DataSource;
    1817import org.openstreetmap.josm.gui.ExtendedDialog;
    19 import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask;
    2018import org.openstreetmap.josm.tools.Shortcut;
    2119
     
    7472                return;
    7573        }
    76        
     74
    7775        int result = new ExtendedDialog(Main.parent,
    7876                tr("Update Data"),
    7977                tr("This action will require {0} individual download requests. "
    8078                        + "Do you wish to continue?", bboxCount),
    81                 new String[] { "Update Data", "Cancel" },
     79                new String[] { tr("Update Data"), tr("Cancel") },
    8280                new String[] { "updatedata.png", "cancel.png" }).getValue();
    8381
     
    8583            return;
    8684
    87         DownloadTask osmTask = new DownloadOsmTask();
    88         for(Area a : areas) {
    89             Rectangle2D td = a.getBounds2D();
    90             osmTask.download(null, td.getMinY(), td.getMinX(), td.getMaxY(), td.getMaxX());
    91         }
     85        new DownloadOsmTaskList().download(false, areas);
    9286    }
    9387
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r1415 r1465  
    55
    66import java.io.IOException;
     7import java.util.concurrent.Future;
    78
    89import javax.swing.JCheckBox;
     
    1011import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.actions.DownloadAction;
     13import org.openstreetmap.josm.data.gpx.GpxData;
    1214import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1315import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask;
     16import org.openstreetmap.josm.gui.layer.GpxLayer;
    1417import org.openstreetmap.josm.gui.layer.Layer;
    15 import org.openstreetmap.josm.gui.layer.GpxLayer;
    16 import org.openstreetmap.josm.data.gpx.GpxData;
    1718import org.openstreetmap.josm.io.BoundingBoxDownloader;
    1819import org.xml.sax.SAXException;
    1920
    2021public class DownloadGpsTask implements DownloadTask {
     22    private Future<Task> task = null;
    2123
    2224    private static class Task extends PleaseWaitRunnable {
     
    2426        private GpxData rawData;
    2527        private final boolean newLayer;
     28        private String msg = "";
    2629
    27         public Task(boolean newLayer, BoundingBoxDownloader reader) {
     30        public Task(boolean newLayer, BoundingBoxDownloader reader, boolean silent, String msg) {
    2831            super(tr("Downloading GPS data"));
     32            this.msg = msg;
    2933            this.reader = reader;
    3034            this.newLayer = newLayer;
     35            this.silent = silent;
    3136        }
    3237
    3338        @Override public void realRun() throws IOException, SAXException {
     39            Main.pleaseWaitDlg.setCustomText(msg);
    3440            rawData = reader.parseRawGps();
    3541        }
     
    4652            else
    4753                x.mergeFrom(layer);
     54
     55            Main.pleaseWaitDlg.setCustomText("");
    4856        }
    4957
     
    6472            if (reader != null)
    6573                reader.cancel();
     74            Main.pleaseWaitDlg.cancel.setEnabled(false);
    6675        }
    6776    }
     
    6978    private JCheckBox checkBox = new JCheckBox(tr("Raw GPS data"));
    7079
    71     public void download(DownloadAction action, double minlat, double minlon, double maxlat, double maxlon) {
    72         Task task = new Task(action.dialog.newLayer.isSelected(), new BoundingBoxDownloader(minlat, minlon, maxlat, maxlon));
    73         Main.worker.execute(task);
     80    public void download(DownloadAction action, double minlat, double minlon,
     81            double maxlat, double maxlon) {
     82        download(action, minlat, minlon, maxlat, maxlon, false, "");
     83    }
     84
     85    public void download(DownloadAction action, double minlat, double minlon,
     86            double maxlat, double maxlon, boolean silent, String message) {
     87        Task t = new Task(action.dialog.newLayer.isSelected(),
     88                new BoundingBoxDownloader(minlat, minlon, maxlat, maxlon),
     89                silent,
     90                message);
     91        // We need submit instead of execute so we can wait for it to finish and get the error
     92        // message if necessary. If no one calls getErrorMessage() it just behaves like execute.
     93        task = Main.worker.submit(t, t);
    7494    }
    7595
     
    85105        // FIXME this is not currently used
    86106    }
     107
     108    /*
     109     * (non-Javadoc)
     110     * @see org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask#getErrorMessage()
     111     */
     112    public String getErrorMessage() {
     113        if(task == null)
     114            return "";
     115
     116        try {
     117            Task t = task.get();
     118            return t.errorMessage == null
     119                ? ""
     120                : t.errorMessage;
     121        } catch (Exception e) {
     122            return "";
     123        }
     124    }
    87125}
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java

    r1169 r1465  
    55
    66import java.io.IOException;
     7import java.util.concurrent.Future;
    78
    89import javax.swing.JCheckBox;
     
    1011import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.actions.DownloadAction;
     13import org.openstreetmap.josm.data.Bounds;
     14import org.openstreetmap.josm.data.coor.LatLon;
    1215import org.openstreetmap.josm.data.osm.DataSet;
    1316import org.openstreetmap.josm.data.osm.DataSource;
    1417import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1518import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask;
     19import org.openstreetmap.josm.gui.layer.Layer;
    1620import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1721import org.openstreetmap.josm.io.BoundingBoxDownloader;
    1822import org.openstreetmap.josm.io.OsmServerLocationReader;
    1923import org.openstreetmap.josm.io.OsmServerReader;
    20 import org.openstreetmap.josm.data.Bounds;
    21 import org.openstreetmap.josm.data.coor.LatLon;
    2224import org.xml.sax.SAXException;
    2325
     
    2830 */
    2931public class DownloadOsmTask implements DownloadTask {
    30 
    3132    private static Bounds currentBounds;
     33    private Future<Task> task = null;
    3234
    3335    private static class Task extends PleaseWaitRunnable {
     
    3537        private DataSet dataSet;
    3638        private boolean newLayer;
    37 
    38         public Task(boolean newLayer, OsmServerReader reader) {
     39        private int num = 1;
     40        private String msg = "";
     41       
     42        public Task(boolean newLayer, OsmServerReader reader, boolean silent,
     43                int numLayers, String msg) {
    3944            super(tr("Downloading data"));
     45            this.msg = msg;
    4046            this.reader = reader;
    4147            this.newLayer = newLayer;
     48            this.silent = silent;
    4249        }
    4350
    4451        @Override public void realRun() throws IOException, SAXException {
     52            Main.pleaseWaitDlg.setCustomText(msg);
    4553            dataSet = reader.parseOsm();
    4654        }
     
    4856        @Override protected void finish() {
    4957            if (dataSet == null)
    50                 return; // user cancelled download or error occoured
     58                return; // user canceled download or error occurred
    5159            if (dataSet.allPrimitives().isEmpty()) {
    52                 errorMessage = tr("No data imported.");
     60                // If silent is set to true, we don't want to see information messages
     61                if(!silent)
     62                    errorMessage = tr("No data imported.");
    5363                // need to synthesize a download bounds lest the visual indication of downloaded
    5464                // area doesn't work
    5565                dataSet.dataSources.add(new DataSource(currentBounds, "OpenStreetMap server"));
    5666            }
    57 
    58             OsmDataLayer layer = new OsmDataLayer(dataSet, tr("Data Layer"), null);
     67           
     68            OsmDataLayer layer = new OsmDataLayer(dataSet, tr("Data Layer {0}", num), null);
    5969            if (newLayer)
    6070                Main.main.addLayer(layer);
    6171            else
    6272                Main.main.editLayer().mergeFrom(layer);
     73           
     74            Main.pleaseWaitDlg.setCustomText("");
    6375        }
    6476
     
    6678            if (reader != null)
    6779                reader.cancel();
     80            Main.pleaseWaitDlg.cancel.setEnabled(false);
    6881        }
    6982    }
    7083    private JCheckBox checkBox = new JCheckBox(tr("OpenStreetMap data"), true);
    7184
    72     public void download(DownloadAction action, double minlat, double minlon, double maxlat, double maxlon) {
     85    public void download(DownloadAction action, double minlat, double minlon,
     86            double maxlat, double maxlon, boolean silent, String message) {
    7387        // Swap min and max if user has specified them the wrong way round
    7488        // (easy to do if you are crossing 0, for example)
     
    8094            double t = minlon; minlon = maxlon; maxlon = t;
    8195        }
     96       
     97        boolean newLayer = action != null
     98                                && (action.dialog == null || action.dialog.newLayer.isSelected());
    8299
    83         Task task = new Task(action != null && (action.dialog == null || action.dialog.newLayer.isSelected()), new BoundingBoxDownloader(minlat, minlon, maxlat, maxlon));
     100        Task t = new Task(newLayer,
     101                new BoundingBoxDownloader(minlat, minlon, maxlat, maxlon),
     102                silent,
     103                getDataLayersCount(),
     104                message);
    84105        currentBounds = new Bounds(new LatLon(minlat, minlon), new LatLon(maxlat, maxlon));
    85         Main.worker.execute(task);
     106        // We need submit instead of execute so we can wait for it to finish and get the error
     107        // message if necessary. If no one calls getErrorMessage() it just behaves like execute.
     108        task = Main.worker.submit(t, t);       
     109    }
     110   
     111    public void download(DownloadAction action, double minlat, double minlon,
     112            double maxlat, double maxlon) {
     113        download(action, minlat, minlon, maxlat, maxlon, false, "");
    86114    }
    87115
     116    /**
     117     * Loads a given URL from the OSM Server
     118     * @param True if the data should be saved to a new layer
     119     * @param The URL as String
     120     */
    88121    public void loadUrl(boolean new_layer, String url) {
    89         Task task = new Task(new_layer, new OsmServerLocationReader(url));
    90         Main.worker.execute(task);
     122        Task t = new Task(new_layer,
     123                new OsmServerLocationReader(url),
     124                false,
     125                getDataLayersCount(),
     126                "");
     127        task = Main.worker.submit(t, t);
    91128    }
    92 
    93 
    94 
    95129
    96130    public JCheckBox getCheckBox() {
     
    101135        return "osm";
    102136    }
     137   
     138    /**
     139     * Finds the number of data layers currently opened
     140     * @return Number of data layers
     141     */
     142    private int getDataLayersCount() {
     143        if(Main.map == null || Main.map.mapView == null)
     144            return 0;
     145        int num = 0;
     146        for(Layer l : Main.map.mapView.getAllLayers())
     147            if(l instanceof OsmDataLayer)
     148                num++;
     149        return num;
     150    }
     151   
     152   /*
     153    * (non-Javadoc)
     154    * @see org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask#getErrorMessage()
     155    */
     156    public String getErrorMessage() {
     157        if(task == null)
     158            return "";       
     159
     160        try {
     161            Task t = task.get();
     162            return t.errorMessage == null
     163                ? ""
     164                : t.errorMessage;
     165        } catch (Exception e) {
     166            return "";
     167        }
     168    }
    103169}
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r1415 r1465  
    2626
    2727    public final JLabel currentAction = new JLabel(I18n.tr("Contacting the OSM server..."));
     28    private final JLabel customText = new JLabel("");
    2829    public final BoundedRangeModel progress = progressBar.getModel();
    2930    public final JButton cancel = new JButton(I18n.tr("Cancel"));
     
    3536        pane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    3637        pane.add(currentAction, GBC.eol().fill(GBC.HORIZONTAL));
     38        pane.add(customText, GBC.eol().fill(GBC.HORIZONTAL));
    3739        pane.add(progressBar, GBC.eop().fill(GBC.HORIZONTAL));
    3840        pane.add(cancel, GBC.eol().anchor(GBC.CENTER));
    3941        setContentPane(pane);
    40         setSize(Main.pref.getInteger("progressdialog.size",600),100);
     42        //setSize(Main.pref.getInteger("progressdialog.size",600),100);
     43        setCustomText("");
    4144        setLocationRelativeTo(Main.parent);
    4245        addComponentListener(new ComponentListener() {
     
    5659        progressBar.setIndeterminate(newValue);
    5760    }
     61   
     62    /**
     63     * Sets a custom text line below currentAction. Can be used to display additional information
     64     * @param text
     65     */
     66    public void setCustomText(String text) {
     67        if(text.length() == 0) {
     68            customText.setVisible(false);
     69            setSize(Main.pref.getInteger("progressdialog.size", 600), 100);
     70            return;
     71        }
     72       
     73        customText.setVisible(true);
     74        customText.setText(text);
     75        setSize(Main.pref.getInteger("progressdialog.size", 600), 120);
     76    }
    5877}
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r1195 r1465  
    2525 */
    2626public abstract class PleaseWaitRunnable implements Runnable {
    27 
     27    public boolean silent = false;
    2828    public String errorMessage;
    2929
     
    6666            // reset dialog state
    6767            Main.pleaseWaitDlg.setTitle(title);
     68            Main.pleaseWaitDlg.cancel.setEnabled(true);
     69            Main.pleaseWaitDlg.setCustomText("");
    6870            errorMessage = null;
    6971            closeDialogCalled = false;
     
    131133                        Main.pleaseWaitDlg.dispose();
    132134                    }
    133                     if (errorMessage != null)
     135                    if (errorMessage != null && !silent)
    134136                        JOptionPane.showMessageDialog(Main.parent, errorMessage);
    135137                }
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r1392 r1465  
    5151    public interface DownloadTask {
    5252        /**
    53          * Execute the download.
    54          */
    55         void download(DownloadAction action, double minlat, double minlon, double maxlat, double maxlon);
     53         * Execute the download using the given bounding box
     54         */
     55        void download(DownloadAction action, double minlat, double minlon,
     56                double maxlat, double maxlon);
     57
     58        /**
     59         * Execute the download using the given bounding box. Set silent to true if no error
     60         * messages should be popped up. Message can be used to display an additional text below
     61         * the default description.
     62         */
     63        void download(DownloadAction action, double minlat, double minlon,
     64                double maxlat, double maxlon, boolean silent, String message);
     65
     66        /**
     67         * Execute the download using the given URL
     68         * @param newLayer
     69         * @param url
     70         */
    5671        void loadUrl(boolean newLayer, String url);
     72
    5773        /**
    5874         * @return The checkbox presented to the user
    5975         */
    6076        JCheckBox getCheckBox();
     77
    6178        /**
    6279         * @return The name of the preferences suffix to use for storing the
     
    6481         */
    6582        String getPreferencesSuffix();
     83
     84        /**
     85         * Gets the error message of the task once it executed. If there is no error message, an empty
     86         * string is returned.
     87         *
     88         * WARNING: Never call this in the same thread you requested the download() or it will cause a
     89         * dead lock. See actions/downloadTasks/DownloadOsmTaskList.java for a proper implementation.
     90         *
     91         * @return Error message or empty String
     92         */
     93        String getErrorMessage();
    6694    }
    6795
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r1462 r1465  
    1616import java.awt.geom.Area;
    1717import java.awt.geom.Rectangle2D;
    18 import java.io.BufferedReader;
    1918import java.io.File;
    20 import java.io.FileInputStream;
    21 import java.io.FileOutputStream;
     19import java.text.DateFormat;
     20import java.text.DecimalFormat;
    2221import java.io.InputStreamReader;
    2322import java.net.URL;
     
    3029import java.util.Comparator;
    3130import java.util.Iterator;
     31import java.util.Date;
    3232import java.util.LinkedList;
    33 import java.util.Date;
    3433import java.util.List;
    35 import java.text.DateFormat;
    36 import java.text.DecimalFormat;
    3734
    3835import javax.swing.AbstractAction;
     
    4037import javax.swing.ButtonGroup;
    4138import javax.swing.Icon;
    42 import javax.swing.JCheckBox;
    4339import javax.swing.JColorChooser;
    4440import javax.swing.JFileChooser;
     
    5046import javax.swing.JRadioButton;
    5147import javax.swing.JSeparator;
    52 import javax.swing.JTextField;
    5348import javax.swing.filechooser.FileFilter;
    5449
     
    5752import org.openstreetmap.josm.actions.SaveAction;
    5853import org.openstreetmap.josm.actions.SaveAsAction;
    59 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
     54import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTaskList;
    6055import org.openstreetmap.josm.data.coor.EastNorth;
    6156import org.openstreetmap.josm.data.coor.LatLon;
     
    7166import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    7267import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
    73 import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask;
    7468import org.openstreetmap.josm.gui.layer.markerlayer.AudioMarker;
    7569import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    76 import org.openstreetmap.josm.io.GpxWriter;
    77 import org.openstreetmap.josm.io.MultiPartFormOutputStream;
    7870import org.openstreetmap.josm.tools.DontShowAgainInfo;
    7971import org.openstreetmap.josm.tools.GBC;
     
    380372        {-ll0,-sl9,-ll0,+sl9}
    381373    };
    382    
     374
    383375    // the different color modes
    384376    enum colorModes { none, velocity, dilution }
    385    
     377
    386378    @Override public void paint(Graphics g, MapView mv) {
    387379
     
    392384        Color neutralColor = getColor(name);
    393385        // also draw lines between points belonging to different segments
    394         boolean forceLines = Main.pref.getBoolean("draw.rawgps.lines.force");   
     386        boolean forceLines = Main.pref.getBoolean("draw.rawgps.lines.force");
    395387        // draw direction arrows on the lines
    396         boolean direction = Main.pref.getBoolean("draw.rawgps.direction");   
     388        boolean direction = Main.pref.getBoolean("draw.rawgps.direction");
    397389        // don't draw lines if longer than x meters
    398         int maxLineLength = Main.pref.getInteger("draw.rawgps.max-line-length", -1);       
     390        int maxLineLength = Main.pref.getInteger("draw.rawgps.max-line-length", -1);
    399391        // draw line between points, global setting
    400         boolean lines = Main.pref.getBoolean("draw.rawgps.lines");                               
     392        boolean lines = Main.pref.getBoolean("draw.rawgps.lines");
    401393        String linesKey = "draw.rawgps.lines.layer "+name;
    402394        // draw lines, per-layer setting
    403395        if (Main.pref.hasKey(linesKey))
    404             lines = Main.pref.getBoolean(linesKey);   
     396            lines = Main.pref.getBoolean(linesKey);
    405397        // paint large dots for points
    406398        boolean large = Main.pref.getBoolean("draw.rawgps.large");
     
    408400        colorModes colored = colorModes.none;
    409401        try {
    410             colored = colorModes.values()[Main.pref.getInteger("draw.rawgps.colors", 0)]; 
     402            colored = colorModes.values()[Main.pref.getInteger("draw.rawgps.colors", 0)];
    411403        } catch(Exception e) { }
    412404        // paint direction arrow with alternate math. may be faster
    413         boolean alternatedirection = Main.pref.getBoolean("draw.rawgps.alternatedirection");   
     405        boolean alternatedirection = Main.pref.getBoolean("draw.rawgps.alternatedirection");
    414406        // don't draw arrows nearer to each other than this
    415         int delta = Main.pref.getInteger("draw.rawgps.min-arrow-distance", 0);       
     407        int delta = Main.pref.getInteger("draw.rawgps.min-arrow-distance", 0);
    416408        // allows to tweak line coloring for different speed levels.
    417         int colorTracksTune = Main.pref.getInteger("draw.rawgps.colorTracksTune", 45); 
     409        int colorTracksTune = Main.pref.getInteger("draw.rawgps.colorTracksTune", 45);
    418410        /****************************************************************
    419411         ********** STEP 2a - CHECK CACHE VALIDITY **********************
     
    460452                                        trkPnt.customColoring = colors[(int) (velColor)];
    461453                                    break;
    462                                
     454
    463455                                case dilution:
    464456                                    if(trkPnt.attr.get("hdop") != null) {
     
    470462                                        trkPnt.customColoring = colors[hdopcolor];
    471463                                    }
    472                                     break;                               
     464                                    break;
    473465                            }
    474466
     
    806798            }
    807799
    808             // FIXME: DownloadTask's "please wait" dialog should display the number of
    809             // downloads left, and "cancel" needs to be honoured. An error along the way
    810             // should abort the whole process.
    811             DownloadTask osmTask = new DownloadOsmTask();
    812             for (Rectangle2D td : toDownload) {
    813                osmTask.download(null, td.getMinY(), td.getMinX(), td.getMaxY(), td.getMaxX());
    814             }
     800            new DownloadOsmTaskList().download(false, toDownload);
    815801        }
    816802    }
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r1281 r1465  
    9393            Main.pleaseWaitDlg.progress.setValue(0);
    9494            Main.pleaseWaitDlg.currentAction.setText(tr("Contacting OSM Server..."));
    95             Main.pleaseWaitDlg.setIndeterminate(true); 
     95            Main.pleaseWaitDlg.setIndeterminate(true);
    9696            final InputStream in = getInputStream("map?bbox="+lon1+","+lat1+","+lon2+","+lat2, Main.pleaseWaitDlg);
    97             Main.pleaseWaitDlg.setIndeterminate(false); 
     97            Main.pleaseWaitDlg.setIndeterminate(false);
    9898            if (in == null)
    9999                return null;
Note: See TracChangeset for help on using the changeset viewer.