mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-19 06:40:42 +00:00
Fix bug losing Document's extra cel when we paste and scroll with Space bar
This commit is contained in:
parent
a299826d7d
commit
c25d9ac272
@ -1086,17 +1086,16 @@ void Editor::updateQuicktool()
|
||||
// we change the quicktool. In this way we avoid using the
|
||||
// quicktool brush size to clean the current tool cursor.
|
||||
//
|
||||
// TODO Remove EditorState::regenerateDrawingCursor() creating a
|
||||
// new Document concept of multiple extra cels: we need an extra
|
||||
// cel for the drawing cursor, other for the moving pixels,
|
||||
// etc. In this way we'll not have conflicts between different
|
||||
// uses of the same extra cel.
|
||||
if (m_state->regenerateDrawingCursor())
|
||||
// TODO Create a new Document concept of multiple extra cels: we
|
||||
// need an extra cel for the drawing cursor, other for the moving
|
||||
// pixels, etc. In this way we'll not have conflicts between
|
||||
// different uses of the same extra cel.
|
||||
if (m_state->requireBrushPreview())
|
||||
hideDrawingCursor();
|
||||
|
||||
m_quicktool = new_quicktool;
|
||||
|
||||
if (m_state->regenerateDrawingCursor())
|
||||
if (m_state->requireBrushPreview())
|
||||
showDrawingCursor();
|
||||
|
||||
// If the tool has changed, we must to update the status bar because
|
||||
|
@ -107,10 +107,6 @@ namespace app {
|
||||
// Returns true if this state accept the given quicktool.
|
||||
virtual bool acceptQuickTool(tools::Tool* tool) { return true; }
|
||||
|
||||
// Returns true if this state supports changing the drawing cursor
|
||||
// extra cel.
|
||||
virtual bool regenerateDrawingCursor() { return true; }
|
||||
|
||||
private:
|
||||
DISABLE_COPYING(EditorState);
|
||||
};
|
||||
|
@ -27,6 +27,8 @@ namespace app {
|
||||
virtual bool onMouseMove(Editor* editor, ui::MouseMessage* msg) override;
|
||||
virtual bool onUpdateStatusBar(Editor* editor) override;
|
||||
|
||||
virtual bool requireBrushPreview() override { return false; }
|
||||
|
||||
private:
|
||||
Cel* m_cel;
|
||||
gfx::Point m_celStart;
|
||||
|
@ -48,7 +48,7 @@ namespace app {
|
||||
virtual bool onKeyUp(Editor* editor, ui::KeyMessage* msg) override;
|
||||
virtual bool onUpdateStatusBar(Editor* editor) override;
|
||||
virtual bool acceptQuickTool(tools::Tool* tool) override;
|
||||
virtual bool regenerateDrawingCursor() override { return false; }
|
||||
virtual bool requireBrushPreview() override { return false; }
|
||||
|
||||
// EditorObserver
|
||||
virtual void onBeforeFrameChanged(Editor* editor) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user