Changeset 5048 in josm for trunk


Ignore:
Timestamp:
2012-03-07T14:57:42+01:00 (8 years ago)
Author:
akks
Message:

fix #7429 - Shortcut redefinition in Save As feature

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

Legend:

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

    r4982 r5048  
    1717 */
    1818public class SaveAsAction extends SaveActionBase {
    19 
     19    private static SaveAsAction instance = new SaveAsAction();
     20   
    2021    /**
    2122     * Construct the action with "Save" as label.
     
    2829        putValue("help", ht("/Action/SaveAs"));
    2930    }
     31   
     32    public static SaveAsAction getInstance() {
     33        return instance;
     34    }
    3035
    3136    @Override protected File getFile(Layer layer) {
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r5014 r5048  
    121121    public final OpenLocationAction openLocation = new OpenLocationAction();
    122122    public final JosmAction save = SaveAction.getInstance();
    123     public final JosmAction saveAs = new SaveAsAction();
     123    public final JosmAction saveAs = SaveAsAction.getInstance();
    124124    public JosmAction sessionLoad;
    125125    public JosmAction sessionSaveAs;
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r5014 r5048  
    381381
    382382        public void actionPerformed(ActionEvent e) {
    383             new SaveAsAction().doSave(layer);
     383            SaveAsAction.getInstance().doSave(layer);
    384384        }
    385385    }
Note: See TracChangeset for help on using the changeset viewer.