mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 01:13:40 +00:00
Clear selection cursor/eraser brush edges when closing the Editor (fix #4922)
This is a special case where the cursor was still visible on the screen (the UILayer on the Display) and the Editor/Doc was closed without any confirmation. So we have to explicitly hide/remove the UILayer from the Display when the BrushPreview is destroyed.
This commit is contained in:
parent
8e3d15584c
commit
f46ff23b89
@ -112,6 +112,13 @@ BrushPreview::BrushPreview(Editor* editor) : m_editor(editor)
|
|||||||
|
|
||||||
BrushPreview::~BrushPreview()
|
BrushPreview::~BrushPreview()
|
||||||
{
|
{
|
||||||
|
if (m_onScreen) {
|
||||||
|
// Called mainly to remove the UILayer from the Display. If we
|
||||||
|
// don't explicitly call Display::removeLayer(), the m_uiLayer
|
||||||
|
// instance will be referenced by the Display until it's destroyed
|
||||||
|
// (keeping the UILayer alive and visible for the whole program).
|
||||||
|
hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BrushRef BrushPreview::getCurrentBrush()
|
BrushRef BrushPreview::getCurrentBrush()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user