Skip to content

Commit

Permalink
update to JOSM 14381
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Oct 30, 2018
1 parent c0c9b21 commit 6f5c89e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ plugin.link=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/PT_Assistant
plugin.canloadatruntime=true

# Minimum JOSM version (any numeric version)
plugin.main.version=14149
plugin.main.version=14381
# JOSM version to compile against (any numeric version available for download, or the special values "tested" or "latest")
plugin.compile.version=14178
plugin.compile.version=14382
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.swing.SwingUtilities;

Expand All @@ -22,12 +23,15 @@
/**
* This class was copied with minor changes from ValidatorDialog.FixTask
*
* FIXME: remove this copy/paste by extending JOSM core class
*
* @author darya
*
*/
public class FixTask extends PleaseWaitRunnable {

private final Collection<TestError> testErrors;
private final List<Command> fixCommands = new ArrayList<>();
private boolean canceled;

public FixTask(Collection<TestError> testErrors) {
Expand All @@ -53,6 +57,7 @@ protected void fixError(TestError error) throws InterruptedException, Invocation
@Override
public void run() {
UndoRedoHandler.getInstance().addNoRedraw(fixCommand);
fixCommands.add(fixCommand);
}
});
}
Expand Down Expand Up @@ -86,7 +91,7 @@ protected void realRun() throws SAXException, IOException, OsmTransferException
}
monitor.subTask(tr("Updating map ..."));
SwingUtilities.invokeAndWait(() -> {
UndoRedoHandler.getInstance().afterAdd(null);
UndoRedoHandler.getInstance().afterAdd(fixCommands);
MainApplication.getMap().repaint();
});
} catch (InterruptedException | InvocationTargetException e) {
Expand Down

0 comments on commit 6f5c89e

Please sign in to comment.