Ticket #4161: new_patch.diff
File new_patch.diff, 3.0 KB (added by , 13 years ago) |
---|
-
core/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
61 61 } 62 62 } 63 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 }76 }77 78 64 protected void setChangesets(Collection<Changeset> changesets) { 79 65 shownChangesets.clear(); 80 66 if (changesets != null) { -
core/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetsInActiveDataLayerListModel.java
3 3 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; 12 9 import org.openstreetmap.josm.data.osm.event.NodeMovedEvent; … … 35 32 initFromDataSet(event.getDataset()); 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 */} 59 42