Changeset 4572 in josm
- Timestamp:
- 2011-11-03T18:55:27+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
r4191 r4572 59 59 } 60 60 selectionModel.addSelectionInterval(idx,idx); 61 }62 }63 64 protected void addChangeset(Changeset changeset) {65 if (shownChangesets.add(changeset)) {66 setChangesets(shownChangesets);67 updateModel();68 }69 }70 71 protected void removeChangeset(Changeset changeset) {72 if (shownChangesets.remove(changeset)) {73 setChangesets(shownChangesets);74 updateModel();75 61 } 76 62 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetsInActiveDataLayerListModel.java
r4223 r4572 4 4 import javax.swing.DefaultListSelectionModel; 5 5 6 import org.openstreetmap.josm.data.osm.Changeset;7 import org.openstreetmap.josm.data.osm.OsmPrimitive;8 6 import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent; 9 import org.openstreetmap.josm.data.osm.event.ChangesetIdChangedEvent;10 7 import org.openstreetmap.josm.data.osm.event.DataChangedEvent; 11 8 import org.openstreetmap.josm.data.osm.event.DataSetListener; … … 36 33 } 37 34 38 public void primitivesAdded(PrimitivesAddedEvent event) { 39 for (OsmPrimitive primitive:event.getPrimitives()) { 40 addChangeset(new Changeset(primitive.getChangesetId())); 41 } 42 } 35 public void primitivesAdded(PrimitivesAddedEvent event) {/* ignored */} 43 36 44 public void primitivesRemoved(PrimitivesRemovedEvent event) { 45 for (OsmPrimitive primitive:event.getPrimitives()) { 46 removeChangeset(new Changeset(primitive.getChangesetId())); 47 } 48 } 37 public void primitivesRemoved(PrimitivesRemovedEvent event) {/* ignored */} 49 38 50 public void otherDatasetChange(AbstractDatasetChangedEvent event) { 51 if (event instanceof ChangesetIdChangedEvent) { 52 ChangesetIdChangedEvent e = (ChangesetIdChangedEvent) event; 53 removeChangeset(new Changeset(e.getOldChangesetId())); 54 addChangeset(new Changeset(e.getNewChangesetId())); 55 } 56 } 39 public void otherDatasetChange(AbstractDatasetChangedEvent event) {/* ignored */} 57 40 58 41 public void nodeMoved(NodeMovedEvent event) {/* ignored */}
Note:
See TracChangeset
for help on using the changeset viewer.