mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
When the editor's current sprite is set we have to drop the pixels (if the user is moving pixels).
This commit is contained in:
parent
7b272f86f7
commit
f8cd32d07b
@ -131,8 +131,12 @@ void Editor::editor_set_sprite(Sprite* sprite)
|
||||
if (this->hasMouse())
|
||||
jmanager_free_mouse(); // TODO Why is this here? Review this code
|
||||
|
||||
// The editor must be stand-by state
|
||||
ASSERT(m_state == EDITOR_STATE_STANDBY);
|
||||
// Do we need to drop files?
|
||||
if (m_pixelsMovement)
|
||||
dropPixels();
|
||||
|
||||
ASSERT(m_pixelsMovement == NULL && "You cannot change the current sprite while you are moving pixels");
|
||||
ASSERT(m_state == EDITOR_STATE_STANDBY && "You can change the current sprite only in stand-by state");
|
||||
|
||||
// Change the sprite
|
||||
m_sprite = sprite;
|
||||
|
Loading…
x
Reference in New Issue
Block a user