Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions engine/src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ void MCImage::setrect(const MCRectangle &nrect)

if (!(state & CS_SIZE) || !(state & CS_EDITED))
{
apply_transform();
// IM-2013-04-15: [[ BZ 10827 ]] if the image has rotation then apply_transform()
// will reset the rect otherwise it will stay as set, in which case we can avoid
// the call to apply_transform() and any costly image loading that might cause
if (angle != 0)
apply_transform();
if ((rect.width != orect.width || rect.height != orect.height) && m_rep != nil)
{
layer_rectchanged(orect, true);
Expand Down Expand Up @@ -2035,7 +2039,9 @@ void MCImage::setrep(MCImageRep *p_rep)
}

// IM-2013-03-11: [[ BZ 10723 ]] If we have a new image, ensure that the current frame falls within the new framecount
setframe(currentframe);
// IM-2013-04-15: [[ BZ 10827 ]] Skip this check if the currentframe is 0 (preventing unnecessary image loading)
if (currentframe != 0)
setframe(currentframe);

notifyneeds(false);
}
Expand Down