- Timestamp:
- 2018-10-28T21:04:34+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
r14282 r14381 5 5 import java.util.Iterator; 6 6 import java.util.LinkedList; 7 import java.util.List; 7 8 import java.util.Objects; 8 9 … … 305 306 if (cmd != null) { 306 307 fireEvent(new CommandAddedEvent(this, cmd)); 308 } 309 fireCommandsChanged(); 310 } 311 312 /** 313 * Fires a commands change event after adding a list of commands. 314 * @param cmds commands added 315 * @since 14381 316 */ 317 public void afterAdd(List<? extends Command> cmds) { 318 if (cmds != null) { 319 for (Command cmd : cmds) { 320 fireEvent(new CommandAddedEvent(this, cmd)); 321 } 307 322 } 308 323 fireCommandsChanged(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r14153 r14381 534 534 /** 535 535 * Task for fixing a collection of {@link TestError}s. Can be run asynchronously. 536 *537 *538 536 */ 539 537 class FixTask extends PleaseWaitRunnable { 540 538 private final Collection<TestError> testErrors; 539 private final List<Command> fixCommands = new ArrayList<>(); 541 540 private boolean canceled; 542 541 … … 561 560 if (fixCommand != null) { 562 561 SwingUtilities.invokeAndWait(() -> UndoRedoHandler.getInstance().addNoRedraw(fixCommand)); 562 fixCommands.add(fixCommand); 563 563 } 564 564 // It is wanted to ignore an error if it said fixable, even if fixCommand was null … … 591 591 monitor.subTask(tr("Updating map ...")); 592 592 SwingUtilities.invokeAndWait(() -> { 593 UndoRedoHandler.getInstance().afterAdd( null);593 UndoRedoHandler.getInstance().afterAdd(fixCommands); 594 594 invalidateValidatorLayers(); 595 595 tree.resetErrors();
Note:
See TracChangeset
for help on using the changeset viewer.