- Timestamp:
- 2009-11-10T22:05:37+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
r2433 r2434 2 2 package org.openstreetmap.josm.actions; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;6 6 7 7 import java.awt.event.ActionEvent; … … 216 216 public void run() { 217 217 targetLayer.fireDataChange(); 218 targetLayer.onPostDownloadFromServer(); 218 219 Main.map.mapView.repaint(); 219 220 } … … 253 254 String msg = ""; 254 255 switch(entry.getValue()) { 255 256 257 256 case NODE: msg = tr("({0}/{1}) Loading parents of node {2}", i+1,children.size(), entry.getKey()); break; 257 case WAY: msg = tr("({0}/{1}) Loading parents of way {2}", i+1,children.size(), entry.getKey()); break; 258 case RELATION: msg = tr("({0}/{1}) Loading parents of relation {2}", i+1,children.size(), entry.getKey()); break; 258 259 } 259 260 progressMonitor.subTask(msg); -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r2414 r2434 157 157 } 158 158 target.mergeFrom(dataSet); 159 target.onPostDownloadFromServer(); 159 160 } 160 161 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r2224 r2434 305 305 } 306 306 OsmDataLayer odl = (OsmDataLayer)l; 307 if ( odl.requiresSaveToFile() || odl.requiresUploadToServer()) {307 if ((odl.requiresSaveToFile() || odl.requiresUploadToServer()) && odl.data.isModified()) { 308 308 layersWithUnmodifiedChanges.add(odl); 309 309 } … … 314 314 dialog.setVisible(true); 315 315 switch(dialog.getUserAction()) { 316 317 318 316 case CANCEL: return false; 317 case PROCEED: return true; 318 default: return false; 319 319 } 320 320 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r2433 r2434 56 56 import org.openstreetmap.josm.data.conflict.Conflict; 57 57 import org.openstreetmap.josm.data.osm.DataSet; 58 import org.openstreetmap.josm.data.osm.DataSetMerger; 58 59 import org.openstreetmap.josm.data.osm.DataSource; 59 import org.openstreetmap.josm.data.osm.DataSetMerger;60 60 import org.openstreetmap.josm.data.osm.OsmPrimitive; 61 61 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 1468 1468 public void run() { 1469 1469 curLayer.fireDataChange(); 1470 curLayer.onPostDownloadFromServer(); 1470 1471 } 1471 1472 }); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r2433 r2434 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.data.osm.DataSet; 15 import org.openstreetmap.josm.data.osm.DataSetMerger; 15 16 import org.openstreetmap.josm.data.osm.DataSource; 16 import org.openstreetmap.josm.data.osm.DataSetMerger;17 17 import org.openstreetmap.josm.data.osm.Relation; 18 18 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 179 179 public void run() { 180 180 getLayer().fireDataChange(); 181 getLayer().onPostDownloadFromServer(); 181 182 } 182 183 } -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r2433 r2434 49 49 import org.openstreetmap.josm.data.osm.BackreferencedDataSet; 50 50 import org.openstreetmap.josm.data.osm.DataSet; 51 import org.openstreetmap.josm.data.osm.DataSetMerger; 51 52 import org.openstreetmap.josm.data.osm.DataSource; 52 import org.openstreetmap.josm.data.osm.DataSetMerger;53 53 import org.openstreetmap.josm.data.osm.Node; 54 54 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 484 484 485 485 /** 486 * @return The number of not-deleted primitives in the list.486 * @return The number of not-deleted and visible primitives in the list. 487 487 */ 488 488 private int undeletedSize(final Collection<? extends OsmPrimitive> list) { 489 489 int size = 0; 490 490 for (final OsmPrimitive osm : list) 491 if (!osm.isDeleted() ) {491 if (!osm.isDeleted() && osm.isVisible()) { 492 492 size++; 493 493 } … … 692 692 } 693 693 694 public void onPostDownloadFromServer() { 695 setRequiresSaveToFile(true); 696 setRequiresUploadToServer(data.isModified()); 697 } 698 694 699 /** 695 700 * Initializes the layer after a successful save of OSM data to a file
Note:
See TracChangeset
for help on using the changeset viewer.