Gubaer / josm-scripting-plugin

Task automation in the OpenStreetMap editor JOSM
https://gubaer.github.io/josm-scripting-plugin
GNU General Public License v3.0
26 stars 9 forks source link

JOSM 18118 Changed Internals for command? #91

Closed drkludge closed 2 years ago

drkludge commented 3 years ago

It appears that the 18118 build of JOSM has moved the undoRedo from the MainApplication class. MainApplication.undoRedo.add(new SequenceCommand(cmdDescription, cmds))

groovy.lang.MissingPropertyException: No such property: undoRedo for class: org.openstreetmap.josm.gui.MainApplication

Do you have any tips for where this functionality moved to?

Gubaer commented 3 years ago

I think, you can use JOSMs UndoRedoHandler instead.

The JOSM Scripting Plugin uses it too, in its JavaScript API for commands.