mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-03-13 22:50:01 -04:00
Clean up the cursor preview when it is removed from its parent
This commit is contained in:
parent
136357463c
commit
8439a6387e
1 changed files with 6 additions and 1 deletions
|
@ -163,7 +163,12 @@ class Blobbiness {
|
|||
if (!this.options) {
|
||||
return;
|
||||
}
|
||||
if (this.cursorPreview && this.cursorPreview.parent &&
|
||||
// The cursor preview was unattached from the view by an outside process,
|
||||
// such as changing costumes or undo.
|
||||
if (this.cursorPreview && !this.cursorPreview.parent) {
|
||||
this.cursorPreview = null;
|
||||
}
|
||||
if (this.cursorPreview &&
|
||||
this.brushSize === this.options.brushSize &&
|
||||
this.fillColor === this.options.fillColor &&
|
||||
this.strokeColor === this.options.strokeColor &&
|
||||
|
|
Loading…
Reference in a new issue