Ignore:
Timestamp:
2009-10-25T20:48:47+01:00 (17 years ago)
Author:
pieren
Message:

fix some warnings and easier selection of WMSlayer in WMSAdjustAction

File:
1 edited

Legend:

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

    r18207 r18278  
    77import java.util.ArrayList;
    88
    9 import javax.swing.JComboBox;
    109import javax.swing.JLabel;
    1110import javax.swing.JOptionPane;
     
    5049            inputTown.setToolTipText(tr("<html>Enter the town,village or city name.<br>"
    5150                    + "Use the syntax and punctuation known by www.cadastre.gouv.fr .</html>"));
    52             JComboBox inputWMSList = null;
    5351
    5452            p.add(labelSectionNewLocation, GBC.eol());
     
    8886                Main.main.addLayer(wmsLayer);
    8987                System.out.println("Add new layer with Location:" + inputTown.getText());
    90             } else if (existingLayers != null && existingLayers.size() > 0 && inputWMSList.getSelectedIndex() > 0) {
    91                 wmsLayer = existingLayers.get(inputWMSList.getSelectedIndex()-1);
     88            } else if (existingLayers != null && existingLayers.size() > 0 && Main.map.mapView.getActiveLayer() instanceof WMSLayer) {
     89                wmsLayer = (WMSLayer)Main.map.mapView.getActiveLayer();
    9290                resetCookie = true;
    9391            }
Note: See TracChangeset for help on using the changeset viewer.