mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-03 16:20:20 +00:00
We do have to share AppRender between editors
In this way the preview image is visualized in multiple editors for the same sprite.
This commit is contained in:
parent
c2569060f3
commit
d0cca0c16a
@ -139,6 +139,9 @@ private:
|
|||||||
// static
|
// static
|
||||||
doc::ImageBufferPtr Editor::m_renderBuffer;
|
doc::ImageBufferPtr Editor::m_renderBuffer;
|
||||||
|
|
||||||
|
// static
|
||||||
|
AppRender Editor::m_renderEngine;
|
||||||
|
|
||||||
Editor::Editor(Document* document, EditorFlags flags)
|
Editor::Editor(Document* document, EditorFlags flags)
|
||||||
: Widget(editor_type())
|
: Widget(editor_type())
|
||||||
, m_state(new StandbyState())
|
, m_state(new StandbyState())
|
||||||
|
@ -305,7 +305,12 @@ namespace app {
|
|||||||
double m_aniSpeed;
|
double m_aniSpeed;
|
||||||
|
|
||||||
static doc::ImageBufferPtr m_renderBuffer;
|
static doc::ImageBufferPtr m_renderBuffer;
|
||||||
AppRender m_renderEngine;
|
|
||||||
|
// The render engine must be shared between all editors so when a
|
||||||
|
// DrawingState is being used in one editor, other editors for the
|
||||||
|
// same document can show the same preview image/stroke being drawn
|
||||||
|
// (search for Render::setPreviewImage()).
|
||||||
|
static AppRender m_renderEngine;
|
||||||
};
|
};
|
||||||
|
|
||||||
ui::WidgetType editor_type();
|
ui::WidgetType editor_type();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user