Changeset 31596 in osm for applications/editors/josm
- Timestamp:
- 2015-10-05T21:45:36+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/reverter/src/reverter
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java
r30737 r31596 8 8 import java.awt.event.WindowEvent; 9 9 import java.awt.event.WindowListener; 10 import java.util.Collection; 10 11 import java.util.Collections; 11 12 import java.util.LinkedList; … … 26 27 import org.openstreetmap.josm.data.osm.DataSet; 27 28 import org.openstreetmap.josm.gui.ExtendedDialog; 28 import org.openstreetmap.josm.gui.widgets.ChangesetIdTextField;29 29 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 30 30 import org.openstreetmap.josm.tools.GBC; … … 35 35 public class ChangesetIdQuery extends ExtendedDialog { 36 36 private final JPanel panel = new JPanel(new GridBagLayout()); 37 private final ChangesetId TextField tcid = new ChangesetIdTextField();37 private final ChangesetIdsTextField tcid = new ChangesetIdsTextField(); 38 38 private final HistoryComboBox cbId = new HistoryComboBox(); 39 39 private final ButtonGroup bgRevertType = new ButtonGroup(); … … 43 43 private final JCheckBox cbNewLayer = new JCheckBox(tr("Download as new layer")); 44 44 45 public int getChangesetId() {46 return tcid.get ChangesetId();45 public Collection<Integer> getIdsInReverseOrder() { 46 return tcid.getIdsInReverseOrder(); 47 47 } 48 48 -
applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetAction.java
r29769 r31596 5 5 import java.awt.event.ActionEvent; 6 6 import java.awt.event.KeyEvent; 7 import java.util.Collection; 7 8 8 9 import org.openstreetmap.josm.Main; … … 27 28 final ChangesetIdQuery dlg = new ChangesetIdQuery(); 28 29 if (dlg.showDialog().getValue() != 1) return; 29 final int changesetId = dlg.getChangesetId();30 final Collection<Integer> changesetIds = dlg.getIdsInReverseOrder(); 30 31 final RevertType revertType = dlg.getRevertType(); 31 if (changesetId == 0) return;32 32 if (revertType == null) return; 33 33 34 boolean newLayer = dlg.isNewLayerRequired(); 35 Main.worker.submit(new RevertChangesetTask(changesetId, revertType, newLayer, newLayer)); 34 final boolean newLayer = dlg.isNewLayerRequired(); 35 final boolean autoConfirmDownload = newLayer || changesetIds.size() > 1; 36 for (Integer changesetId : changesetIds) { 37 Main.worker.submit(new RevertChangesetTask(changesetId, revertType, autoConfirmDownload, newLayer)); 38 } 36 39 } 37 40 }
Note:
See TracChangeset
for help on using the changeset viewer.