Changeset 29359 in osm for applications/editors


Ignore:
Timestamp:
2013-03-13T22:01:18+01:00 (12 years ago)
Author:
donvip
Message:

[josm_reverter] fix #josm8503 - warn about conflicts

Location:
applications/editors/josm/plugins/reverter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/build.xml

    r29353 r29359  
    44    <property name="commit.message" value="Reverter: Update MultiOsmReader to support null data after redaction"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="5765"/>
     6    <property name="plugin.main.version" value="5775"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetTask.java

    r29347 r29359  
    99import org.openstreetmap.josm.Main;
    1010import org.openstreetmap.josm.command.Command;
     11import org.openstreetmap.josm.command.ConflictAddCommand;
    1112import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1213import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
     
    8788        final Command cmd = new RevertChangesetCommand(tr(revertType == RevertType.FULL ? "Revert changeset #{0}" :
    8889                "Partially revert changeset #{0}",changesetId),cmds);
     90        int n = 0;
     91        for (Command c : cmds) {
     92            if (c instanceof ConflictAddCommand) {
     93                n++;
     94            }
     95        }
     96        final int newConflicts = n;
    8997        GuiHelper.runInEDT(new Runnable() {
    9098            @Override
    9199            public void run() {
    92100                Main.main.undoRedo.add(cmd);
     101                if (newConflicts > 0) {
     102                    Main.map.conflictDialog.warnNumNewConflicts(newConflicts);
     103                }
    93104            }
    94105        });
Note: See TracChangeset for help on using the changeset viewer.