Page 1 of 1

Scripting: moho:DeleteLayer() shouldn't create an undo step.

Posted: Sun Nov 12, 2023 1:13 am
by concavepgons
When scripting with the Lua API, calling the method moho:DeleteLayer() and moho:DeleteMultipleLayers() automatically creates an undo step and marks the document as "dirty" when deleting the layer. It's really undesirable. Especially when you are making a script that deletes a bunch of layers at once (it creates a bunch of undo points).

We can already mark Undo points using moho.document:PrepUndo(), so this functionality of moho:DeleteLayer() and moho:DeleteMultipleLayers() is really unnecessary.