Changeset 10135 in josm for trunk


Ignore:
Timestamp:
2016-04-10T18:03:38+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12734 - display less intrusive warning message when an updated area contains no data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java

    r9230 r10135  
    2727import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    2828import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
     29import org.openstreetmap.josm.gui.Notification;
    2930import org.openstreetmap.josm.gui.layer.Layer;
    3031import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    270271                    @Override
    271272                    public void run() {
    272                         JOptionPane.showMessageDialog(Main.parent, "<html>"
    273                                 + tr("The following errors occurred during mass download: {0}",
    274                                         Utils.joinAsHtmlUnorderedList(items)) + "</html>",
    275                                 tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
     273                        if (items.size() == 1 && tr("No data found in this area.").equals(items.iterator().next())) {
     274                            new Notification(items.iterator().next().toString()).setIcon(JOptionPane.WARNING_MESSAGE).show();
     275                        } else {
     276                            JOptionPane.showMessageDialog(Main.parent, "<html>"
     277                                    + tr("The following errors occurred during mass download: {0}",
     278                                            Utils.joinAsHtmlUnorderedList(items)) + "</html>",
     279                                    tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
     280                        }
    276281                    }
    277282                });
Note: See TracChangeset for help on using the changeset viewer.