Ignore:
Timestamp:
2014-08-20T03:07:15+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #8885 (see #4614) - add offline mode with new command line argument --offline which can take one of several of these values (comma separated):

  • josm_website: to disable all accesses to JOSM website (when not cached, disables Getting Started page, help, plugin list, styles, imagery, presets, rules)
  • osm_api: to disable all accesses to OSM API (disables download, upload, changeset queries, history, user message notification)
  • all: alias to disable all values. Currently equivalent to "josm_website,osm_api"

Plus improved javadoc, fixed EDT violations, and fixed a bug with HTTP redirection sent without "Location" header

File:
1 edited

Legend:

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

    r7217 r7434  
    129129    }
    130130
     131    /**
     132     * Invoked when the action occurs.
     133     * @param e Action event
     134     */
    131135    public static void doActionPerformed(ActionEvent e) {
    132         if(!Main.map.mapView.isActiveLayerDrawable())
     136        if (!Main.map.mapView.isActiveLayerDrawable())
    133137            return;
    134138        boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
     
    149153    }
    150154
    151     @Override public void mouseDragged(MouseEvent e) {
     155    @Override
     156    public void mouseDragged(MouseEvent e) {
    152157        mouseMoved(e);
    153158    }
     
    157162     * @param e The mouse event that has been captured
    158163     */
    159     @Override public void mouseMoved(MouseEvent e) {
     164    @Override
     165    public void mouseMoved(MouseEvent e) {
    160166        oldEvent = e;
    161167        giveUserFeedback(e);
     
    245251        Main.map.mapView.setNewCursor(parameters.mode.cursor(), this);
    246252    }
     253
    247254    /**
    248255     * Gives the user feedback for the action he/she is about to do. Currently
     
    274281     * position.
    275282     */
    276     @Override public void mouseReleased(MouseEvent e) {
     283    @Override
     284    public void mouseReleased(MouseEvent e) {
    277285        if (e.getButton() != MouseEvent.BUTTON1)
    278286            return;
     
    293301    }
    294302
    295     @Override public String getModeHelpText() {
     303    @Override
     304    public String getModeHelpText() {
    296305        return tr("Click to delete. Shift: delete way segment. Alt: do not delete unused nodes when deleting a way. Ctrl: delete referring objects.");
    297306    }
    298307
    299     @Override public boolean layerIsSupported(Layer l) {
     308    @Override
     309    public boolean layerIsSupported(Layer l) {
    300310        return l instanceof OsmDataLayer;
    301311    }
     
    391401    @Override
    392402    public void modifiersChanged(int modifiers) {
    393         if(oldEvent == null)
    394             return;
    395         // We don't have a mouse event, so we pass the old mouse event but the
    396         // new modifiers.
     403        if (oldEvent == null)
     404            return;
     405        // We don't have a mouse event, so we pass the old mouse event but the new modifiers.
    397406        giveUserFeedback(oldEvent, modifiers);
    398407    }
Note: See TracChangeset for help on using the changeset viewer.