Destroy Editor render buffer on exit

This commit is contained in:
David Capello 2015-05-20 16:23:53 -03:00
parent 9a1c522084
commit f683c50198
3 changed files with 10 additions and 2 deletions

View File

@ -609,7 +609,7 @@ App::~App()
App::instance()->Exit();
// Finalize modules, configuration and core.
Editor::exitEditorCursor();
Editor::destroyEditorSharedInternals();
boundary_exit();
delete m_legacy;

View File

@ -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);

View File

@ -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();