mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Use replaceStockImage() in Undoable::setImgType() to avoid duplicated code.
This commit is contained in:
parent
8b7367a1bb
commit
3917892a16
@ -217,11 +217,7 @@ void Undoable::setImgType(int new_imgtype, int dithering_method)
|
||||
return; /* TODO error handling: not enough memory!
|
||||
we should undo all work done */
|
||||
|
||||
if (isEnabled())
|
||||
m_sprite->getUndo()->undo_replace_image(m_sprite->getStock(), c);
|
||||
|
||||
image_free(old_image);
|
||||
m_sprite->getStock()->replaceImage(c, new_image);
|
||||
this->replaceStockImage(c, new_image);
|
||||
}
|
||||
|
||||
/* change "sprite.imgtype" field */
|
||||
|
Loading…
x
Reference in New Issue
Block a user