Changeset 5526 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2012-10-02T20:54:42+02:00 (12 years ago)
Author:
jttt
Message:

Fix #8045 New "Registered toolbar action" bug with the Validator.

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r5459 r5526  
    100100     *            won't be assigned a shortcut unless the user configures one. If you pass null here,
    101101     *            the user CANNOT configure a shortcut for your action.
    102      * @param register register this action for the toolbar preferences?
     102     * @param registerInToolbar register this action for the toolbar preferences?
    103103     * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null
    104104     * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
    105105     */
    106     public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, String toolbarId, boolean installAdapters) {
    107         this(name, iconName == null ? null : ImageProvider.get(iconName), tooltip, shortcut, register,
     106    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
     107        this(name, iconName == null ? null : ImageProvider.get(iconName), tooltip, shortcut, registerInToolbar,
    108108                toolbarId == null ? iconName : toolbarId, installAdapters);
    109109    }
    110110
    111     public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, boolean installAdapters) {
    112         this(name, iconName, tooltip, shortcut, register, null, installAdapters);
    113     }
    114 
    115     public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register) {
    116         this(name, iconName, tooltip, shortcut, register, null, true);
     111    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar, boolean installAdapters) {
     112        this(name, iconName, tooltip, shortcut, registerInToolbar, null, installAdapters);
     113    }
     114
     115    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) {
     116        this(name, iconName, tooltip, shortcut, registerInToolbar, null, true);
    117117    }
    118118
  • trunk/src/org/openstreetmap/josm/actions/ValidateAction.java

    r5463 r5526  
    101101    }
    102102
     103    @Override
     104    public void destroy() {
     105        // Hack - this action should stay forever because it could be added to toolbar
     106        // Do not call super.destroy() here
     107    }
     108
    103109    /**
    104110     * Asynchronous task for running a collection of tests against a collection
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r5463 r5526  
    2222
    2323import org.openstreetmap.josm.Main;
     24import org.openstreetmap.josm.actions.ValidateAction;
    2425import org.openstreetmap.josm.data.projection.Epsg4326;
    2526import org.openstreetmap.josm.data.projection.Lambert;
     
    6768    public static ValidatorLayer errorLayer = null;
    6869
     70    /** The validate action */
     71    public ValidateAction validateAction = new ValidateAction();
     72
    6973    /** Grid detail, multiplier of east,north values for valuable cell sizing */
    7074    public static double griddetail;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r5463 r5526  
    3333import org.openstreetmap.josm.Main;
    3434import org.openstreetmap.josm.actions.AutoScaleAction;
    35 import org.openstreetmap.josm.actions.ValidateAction;
    3635import org.openstreetmap.josm.command.Command;
    3736import org.openstreetmap.josm.data.SelectionChangedListener;
     
    130129        buttons.add(selectButton);
    131130
    132         buttons.add(new SideButton(new ValidateAction()));
     131        buttons.add(new SideButton(Main.main.validator.validateAction));
    133132
    134133        fixButton = new SideButton(new AbstractAction() {
Note: See TracChangeset for help on using the changeset viewer.