Changeset 35645 in osm for applications


Ignore:
Timestamp:
2020-11-16T17:24:45+01:00 (3 years ago)
Author:
Don-vip
Message:

see #7548 - upgrade cadastre-fr plugin to use ProjectionPreference instead of MapPreference

Location:
applications/editors/josm/plugins/cadastre-fr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/build.xml

    r35539 r35645  
    44    <property name="commit.message" value="Changed constructor for Plugin"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="16976"/>
     6    <property name="plugin.main.version" value="17161"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/CadastrePlugin.java

    r35167 r35645  
    3737import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
    3838import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    39 import org.openstreetmap.josm.gui.preferences.map.MapPreference;
    4039import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    4140import org.openstreetmap.josm.gui.util.GuiHelper;
     
    7170 *         Don-vip&lt;vincent.privat@gmail.com&gt; for the maintenance and Edigeo support
    7271 *
    73  * @version 3.0
     72 * @version 3.1
    7473 * <br>History:
    7574 * <br>0.1 17-Jun-2008 first prototype using a first Lambert projection impl. in core
     
    529528     */
    530529    public static void askToChangeProjection() {
    531         GuiHelper.runInEDTAndWait(new Runnable() {
    532             @Override
    533             public void run() {
    534                 if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
    535                         tr("To enable the cadastre WMS plugin, change\n"
    536                                 + "the current projection to one of the cadastre\n"
    537                                 + "projections and retry"),
    538                                 tr("Change the current projection"), JOptionPane.OK_CANCEL_OPTION)
    539                     == JOptionPane.OK_OPTION) {
    540                     PreferenceDialog p = new PreferenceDialog(MainApplication.getMainFrame());
    541                     p.selectPreferencesTabByClass(MapPreference.class);
    542                     p.getTabbedPane().getSetting(ProjectionPreference.class).selectProjection(ProjectionPreference.lambert_cc9);
    543                     p.setVisible(true);
    544                 }
     530        GuiHelper.runInEDTAndWait(() -> {
     531            if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
     532                    tr("To enable the cadastre WMS plugin, change\n"
     533                            + "the current projection to one of the cadastre\n"
     534                            + "projections and retry"),
     535                            tr("Change the current projection"), JOptionPane.OK_CANCEL_OPTION)
     536                == JOptionPane.OK_OPTION) {
     537                PreferenceDialog p = new PreferenceDialog(MainApplication.getMainFrame());
     538                p.selectPreferencesTabByClass(ProjectionPreference.class);
     539                p.getTabbedPane().getSetting(ProjectionPreference.class).selectProjection(ProjectionPreference.lambert_cc9);
     540                p.setVisible(true);
    545541            }
    546542        });
Note: See TracChangeset for help on using the changeset viewer.