From 0fd1d596f9ac91e0bd540590526052a5a66d6672 Mon Sep 17 00:00:00 2001
From: Matthew W. S. Bell <matthew@bells23.org.uk>
Date: Fri, 6 Aug 2010 16:32:03 +0100
Subject: [PATCH 1/4] Correct method and variable names
---
.../josm/actions/UploadSelectionAction.java | 6 +++---
src/org/openstreetmap/josm/data/osm/DataSet.java | 2 +-
.../openstreetmap/josm/gui/layer/OsmDataLayer.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/org/openstreetmap/josm/actions/UploadSelectionAction.java b/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
index 99ba771..4ce7ba3 100644
|
a
|
b
|
public class UploadSelectionAction extends JosmAction{
|
| 92 | 92 | UploadHullBuilder builder = new UploadHullBuilder(); |
| 93 | 93 | UploadSelectionDialog dialog = new UploadSelectionDialog(); |
| 94 | 94 | Collection<OsmPrimitive> modifiedCandidates = getModifiedPrimitives(getEditLayer().data.getSelected()); |
| 95 | | Collection<OsmPrimitive> deletedCandiates = getDeletedPrimitives(getEditLayer().data); |
| 96 | | if (modifiedCandidates.isEmpty() && deletedCandiates.isEmpty()) { |
| | 95 | Collection<OsmPrimitive> deletedCandidates = getDeletedPrimitives(getEditLayer().data); |
| | 96 | if (modifiedCandidates.isEmpty() && deletedCandidates.isEmpty()) { |
| 97 | 97 | JOptionPane.showMessageDialog( |
| 98 | 98 | Main.parent, |
| 99 | 99 | tr("No changes to upload."), |
| … |
… |
public class UploadSelectionAction extends JosmAction{
|
| 104 | 104 | } |
| 105 | 105 | dialog.populate( |
| 106 | 106 | modifiedCandidates, |
| 107 | | deletedCandiates |
| | 107 | deletedCandidates |
| 108 | 108 | ); |
| 109 | 109 | dialog.setVisible(true); |
| 110 | 110 | if (dialog.isCanceled()) |
diff --git a/src/org/openstreetmap/josm/data/osm/DataSet.java b/src/org/openstreetmap/josm/data/osm/DataSet.java
index 0d84042..6b37453 100644
|
a
|
b
|
public class DataSet implements Cloneable {
|
| 899 | 899 | highlightUpdateCount++; |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | | public void clenupDeletedPrimitives() { |
| | 902 | public void cleanupDeletedPrimitives() { |
| 903 | 903 | beginUpdate(); |
| 904 | 904 | try { |
| 905 | 905 | if (cleanupDeleted(nodes.iterator()) |
diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
index 3467d0b..7078082 100644
|
a
|
b
|
public class OsmDataLayer extends Layer implements Listener, SelectionChangedLis
|
| 397 | 397 | Main.main.undoRedo.clean(this); |
| 398 | 398 | |
| 399 | 399 | // if uploaded, clean the modified flags as well |
| 400 | | data.clenupDeletedPrimitives(); |
| | 400 | data.cleanupDeletedPrimitives(); |
| 401 | 401 | for (OsmPrimitive p: data.allPrimitives()) { |
| 402 | 402 | if (processed.contains(p)) { |
| 403 | 403 | p.setModified(false); |