Changeset 8474 in josm


Ignore:
Timestamp:
2015-06-07T14:49:33+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #11177 - Notes: upload before deleting layer doesn't work

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

Legend:

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

    r8419 r8474  
    5353            return;
    5454        }
    55         UploadNotesTask uploadTask = new UploadNotesTask();
    56         uploadTask.uploadNotes(noteData, new PleaseWaitProgressMonitor(tr("Uploading notes to server")));
     55        new UploadNotesTask().uploadNotes(noteData, new PleaseWaitProgressMonitor(tr("Uploading notes to server")));
    5756    }
    5857}
  • trunk/src/org/openstreetmap/josm/data/osm/NoteData.java

    r8473 r8474  
    273273
    274274    private void dataUpdated() {
    275         Main.map.noteDialog.setNotes(getSortedNotes());
    276         Main.map.mapView.repaint();
     275        if (Main.isDisplayingMapView()) {
     276            Main.map.noteDialog.setNotes(getSortedNotes());
     277            Main.map.mapView.repaint();
     278        }
    277279    }
    278280
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r8444 r8474  
    548548            int numProblems = model.getNumCancel() + model.getNumFailed();
    549549            if (numProblems == 0) return;
     550            Main.warn(numProblems + " problems occured during upload/save");
    550551            String msg = trn(
    551552                    "<html>An upload and/or save operation of one layer with modifications<br>"
  • trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java

    r8461 r8474  
    3333import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
    3434import org.openstreetmap.josm.gui.dialogs.NotesDialog;
     35import org.openstreetmap.josm.gui.io.AbstractIOTask;
     36import org.openstreetmap.josm.gui.io.UploadNoteLayerTask;
     37import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    3538import org.openstreetmap.josm.io.NoteExporter;
    3639import org.openstreetmap.josm.io.XmlWriter;
     
    3942
    4043/**
    41  * A layer to hold Note objects
     44 * A layer to hold Note objects.
     45 * @since 7522
    4246 */
    4347public class NoteLayer extends AbstractModifiableLayer implements MouseListener {
     
    246250
    247251    @Override
    248     public void mousePressed(MouseEvent e) { }
    249 
    250     @Override
    251     public void mouseReleased(MouseEvent e) { }
    252 
    253     @Override
    254     public void mouseEntered(MouseEvent e) { }
    255 
    256     @Override
    257     public void mouseExited(MouseEvent e) { }
     252    public AbstractIOTask createUploadTask(ProgressMonitor monitor) {
     253        return new UploadNoteLayerTask(this, monitor);
     254    }
     255
     256    @Override
     257    public void mousePressed(MouseEvent e) {
     258        // Do nothing
     259    }
     260
     261    @Override
     262    public void mouseReleased(MouseEvent e) {
     263        // Do nothing
     264    }
     265
     266    @Override
     267    public void mouseEntered(MouseEvent e) {
     268        // Do nothing
     269    }
     270
     271    @Override
     272    public void mouseExited(MouseEvent e) {
     273        // Do nothing
     274    }
    258275}
Note: See TracChangeset for help on using the changeset viewer.