Brushes continue to draw on previously selected layer if layer is changed while drawing
GIMP version: 2.10
Operating System: Ubuntu (Pop!_OS 18.04 LTS)
Package: https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp
Description of the bug
When a user is drawing on a layer and the layer is changed by a script the draw continues to happen on the previously selected layer rather than the currently selected one. I have written a plugin that consistently exhibits this behaviour: https://github.com/faissaloo/Anidraw
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Install https://github.com/faissaloo/Anidraw/blob/master/anidraw.py (and Python-fu if not already)
- Create a small image (~32x32) with some layers and select the brush tool
- Go to Image -> Anidraw -> Start, and press 'Ok'
- Begin drawing and do not release, you will find that the brush continues to draw on only one layer
…
Expected result: When the layer is switched the brush draws on the newly selected layer.
Actual result: When the layer is switched the brush continues to draw on the previously selected layer.