Ignore:
Timestamp:
2009-08-19T22:54:02+02:00 (16 years ago)
Author:
pieren
Message:

better handling of dialogs cancellations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r17089 r17181  
    7272        } catch (IOException e) {
    7373            /*JOptionPane.showMessageDialog(Main.parent,
    74                     tr("Town/city {0} not found or not available in WMS.\n" +
    75                             "Please check its availibility on www.cadastre.gouv.fr", wmsLayer.getLocation()));*/
     74                    tr("Town/city {0} not found or not available\n" +
     75                            "or action canceled", wmsLayer.getLocation()));*/
    7676            JOptionPane pane = new JOptionPane(
    77                     tr("Town/city {0} not found or not available in WMS.\n" +
    78                             "Please check its availibility on www.cadastre.gouv.fr", wmsLayer.getLocation()),
     77                    tr("Town/city {0} not found or not available\n" +
     78                            "or action canceled", wmsLayer.getLocation()),
    7979                            JOptionPane.INFORMATION_MESSAGE);
    8080            // this below is a temporary workaround to fix the "always on top" issue
     
    260260                // list of values parsed in listOfFeuilles (list all non-georeferenced images)
    261261                lines = getFeuillesList();
    262                 parseFeuillesList(lines);
    263                 if (listOfFeuilles.size() > 0) {
    264                     int res = selectFeuilleDialog();
    265                     if (res != -1) {
    266                         wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).name);
    267                         checkLayerDuplicates(wmsLayer);
    268                         interfaceRef = buildRasterFeuilleInterfaceRef(wmsLayer.getCodeCommune());
    269                         wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).ref);
    270                         lines = buildRasterFeuilleInterfaceRef(listOfFeuilles.elementAt(res).ref);
    271                         System.out.println("interface ref.:"+lines);
    272                         return lines;
    273                     }
     262                if (!downloadCancelled) {
     263                        parseFeuillesList(lines);
     264                        if (listOfFeuilles.size() > 0) {
     265                            int res = selectFeuilleDialog();
     266                            if (res != -1) {
     267                                wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).name);
     268                                checkLayerDuplicates(wmsLayer);
     269                                interfaceRef = buildRasterFeuilleInterfaceRef(wmsLayer.getCodeCommune());
     270                                wmsLayer.setCodeCommune(listOfFeuilles.elementAt(res).ref);
     271                                lines = buildRasterFeuilleInterfaceRef(listOfFeuilles.elementAt(res).ref);
     272                                System.out.println("interface ref.:"+lines);
     273                                return lines;
     274                            }
     275                        }
    274276                }
    275277                return null;
Note: See TracChangeset for help on using the changeset viewer.