Changeset 29717 in osm for applications/editors


Ignore:
Timestamp:
2013-06-28T00:53:11+02:00 (11 years ago)
Author:
pieren
Message:

ask user before cropping

File:
1 edited

Legend:

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

    r29714 r29717  
    55
    66import java.awt.event.ActionEvent;
     7
     8import javax.swing.JOptionPane;
    79
    810import org.openstreetmap.josm.Main;
     
    3739        rasterImageGeoreferencer.addListener();
    3840        if (Main.pref.getBoolean("cadastrewms.noImageCropping", false) == false)
    39             rasterImageGeoreferencer.startCropping(wmsLayer);
     41        {
     42            Object[] options = { "Yes", "No" };
     43            int ret = JOptionPane.showOptionDialog( null,
     44                    tr("Would you like to crop image\nagain ?"),
     45                    tr("Image cropping"),
     46                    JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
     47                    null, options, options[0]);
     48            if (ret == JOptionPane.OK_OPTION)
     49                rasterImageGeoreferencer.startCropping(wmsLayer);
     50            else
     51                rasterImageGeoreferencer.startGeoreferencing(wmsLayer);
     52        }
    4053        else
    4154            rasterImageGeoreferencer.startGeoreferencing(wmsLayer);
Note: See TracChangeset for help on using the changeset viewer.