Changeset 34531 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-08-18T18:49:36+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/michigan_left
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/michigan_left/build.xml

    r33880 r34531  
    44    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="12643"/>
     6    <property name="plugin.main.version" value="14153"/>
    77       
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java

    r33880 r34531  
    1515import javax.swing.JOptionPane;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.actions.JosmAction;
    1918import org.openstreetmap.josm.command.AddCommand;
    2019import org.openstreetmap.josm.command.Command;
    2120import org.openstreetmap.josm.command.SequenceCommand;
     21import org.openstreetmap.josm.data.UndoRedoHandler;
    2222import org.openstreetmap.josm.data.osm.DataSet;
    2323import org.openstreetmap.josm.data.osm.Node;
     
    7676
    7777            if ((ways != 4) && (ways != 5)) {
    78                 JOptionPane.showMessageDialog(Main.parent,
     78                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    7979                    tr("Please select 4 or 5 ways to assign no left turns."));
    8080                return;
     
    9292                }
    9393                if (extremNodes.size() != 4) {
    94                     JOptionPane.showMessageDialog(Main.parent,
     94                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    9595                        tr("Please select 4 ways that form a closed relation."));
    9696                    return;
     
    116116                    }
    117117                    if (!found) {
    118                         JOptionPane.showMessageDialog(Main.parent,
     118                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    119119                            tr("Unable to order the ways. Please verify their directions"));
    120120                        return;
     
    131131                }
    132132                Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds);
    133                 Main.main.undoRedo.add(c);
     133                UndoRedoHandler.getInstance().add(c);
    134134                cmds.clear();
    135135            }
     
    157157
    158158                if (viaNodes.size() != 2) {
    159                     JOptionPane.showMessageDialog(Main.parent,
     159                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    160160                        tr("Unable to find via nodes. Please check your selection"));
    161161                    return;
     
    198198                }
    199199                Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds);
    200                 Main.main.undoRedo.add(c);
     200                UndoRedoHandler.getInstance().add(c);
    201201                cmds.clear();
    202202            }
Note: See TracChangeset for help on using the changeset viewer.