mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Destroy Editor render buffer on exit
This commit is contained in:
parent
9a1c522084
commit
f683c50198
@ -609,7 +609,7 @@ App::~App()
|
||||
App::instance()->Exit();
|
||||
|
||||
// Finalize modules, configuration and core.
|
||||
Editor::exitEditorCursor();
|
||||
Editor::destroyEditorSharedInternals();
|
||||
boundary_exit();
|
||||
|
||||
delete m_legacy;
|
||||
|
@ -201,6 +201,12 @@ Editor::~Editor()
|
||||
m_mask_timer.stop();
|
||||
}
|
||||
|
||||
void Editor::destroyEditorSharedInternals()
|
||||
{
|
||||
m_renderBuffer.reset();
|
||||
exitEditorCursor();
|
||||
}
|
||||
|
||||
bool Editor::isActive() const
|
||||
{
|
||||
return (current_editor == this);
|
||||
|
@ -80,6 +80,8 @@ namespace app {
|
||||
Editor(Document* document, EditorFlags flags = kDefaultEditorFlags);
|
||||
~Editor();
|
||||
|
||||
static void destroyEditorSharedInternals();
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
DocumentView* getDocumentView() { return m_docView; }
|
||||
@ -208,7 +210,6 @@ namespace app {
|
||||
// in cursor.cpp
|
||||
|
||||
static void initEditorCursor();
|
||||
static void exitEditorCursor();
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(ui::Message* msg) override;
|
||||
@ -221,6 +222,7 @@ namespace app {
|
||||
void onExposeSpritePixels(doc::DocumentEvent& ev);
|
||||
|
||||
private:
|
||||
static void exitEditorCursor();
|
||||
void setStateInternal(const EditorStatePtr& newState);
|
||||
void updateQuicktool();
|
||||
void updateContextBarFromModifiers();
|
||||
|
Loading…
x
Reference in New Issue
Block a user