Description
I was editing a two-layer project, and added some text on a the top semi-transparent layer; I then tried to undo this text, and suddenly the two layers merged ("Layer 3" was the bottom layer, see screenshot) and the canvas went blank, as I got this error pop-up:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at Pinta.Tools.TextTool.RedrawText(Boolean showCursor, Boolean useTextLayer)
at Pinta.Tools.TextTool.UpdateMouseCursor(Document document)
at Pinta.Tools.TextTool.OnMouseMove(Document document, ToolMouseEventArgs e)
at Pinta.CanvasWindow.HandleMotion(EventControllerMotion controller, MotionSignalArgs args)
at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, IntPtr paramValuesData, IntPtr invocationHint, IntPtr userData)
Attempting to do almost anything, including zooming or brushing, also yields non-stop pop-up errors. I could still hide and show the layer without any error, but the canvas remained entirely blank. I was getting this one when I tried to undo the last action:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Pinta.Core.DocumentLayers.get_Item(Int32 index)
at Pinta.Core.SwapLayersHistoryItem.Swap()
at Pinta.Core.SwapLayersHistoryItem.Undo()
at Pinta.Core.DocumentHistory.Undo()
at Pinta.Core.EditActions.HandlerPintaCoreActionsEditUndoActivated(Object sender, EventArgs e)
at Pinta.Core.Command.<.ctor>b__33_0(SimpleAction o, ActivateSignalArgs args)
at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, IntPtr paramValuesData, IntPtr invocationHint, IntPtr userData)
When I then tried selecting an area with the rectangular selection tool, Pinta crashed upon releasing the mouse.
To Reproduce
Unable to reproduce with the same steps in the same file nor in a minimal similar project.
Additional Info

Version
Pinta 3.1.2 Flatpak on openSUSE Tumbleweed.
Description
I was editing a two-layer project, and added some text on a the top semi-transparent layer; I then tried to undo this text, and suddenly the two layers merged ("Layer 3" was the bottom layer, see screenshot) and the canvas went blank, as I got this error pop-up:
Attempting to do almost anything, including zooming or brushing, also yields non-stop pop-up errors. I could still hide and show the layer without any error, but the canvas remained entirely blank. I was getting this one when I tried to undo the last action:
When I then tried selecting an area with the rectangular selection tool, Pinta crashed upon releasing the mouse.
To Reproduce
Unable to reproduce with the same steps in the same file nor in a minimal similar project.
Additional Info

Version
Pinta 3.1.2 Flatpak on openSUSE Tumbleweed.