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

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
concavepgons
Posts: 13
Joined: Wed Jun 28, 2023 7:14 pm

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

Post 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.
Post Reply