mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +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!
|
return; /* TODO error handling: not enough memory!
|
||||||
we should undo all work done */
|
we should undo all work done */
|
||||||
|
|
||||||
if (isEnabled())
|
this->replaceStockImage(c, new_image);
|
||||||
m_sprite->getUndo()->undo_replace_image(m_sprite->getStock(), c);
|
|
||||||
|
|
||||||
image_free(old_image);
|
|
||||||
m_sprite->getStock()->replaceImage(c, new_image);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* change "sprite.imgtype" field */
|
/* change "sprite.imgtype" field */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user