Skip to content

Commit 4a94a3f

Browse files
committed
RenderedTarget: Update costume of invisible sprites
1 parent eba3471 commit 4a94a3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ScratchCPPGui/renderedtarget.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ void RenderedTarget::loadProperties()
5252
// Visibility
5353
m_visible = sprite->visible();
5454

55+
m_size = sprite->size() / 100;
56+
updateCostumeData();
57+
5558
if (m_visible) {
5659
// Direction
5760
switch (sprite->rotationStyle()) {
@@ -75,8 +78,6 @@ void RenderedTarget::loadProperties()
7578
}
7679

7780
// Coordinates
78-
m_size = sprite->size() / 100;
79-
updateCostumeData();
8081
double clampedSize = std::min(m_size, m_maxSize);
8182
m_x = static_cast<double>(m_engine->stageWidth()) / 2 + sprite->x() - m_costume->rotationCenterX() * clampedSize / m_costume->bitmapResolution() * (m_newMirrorHorizontally ? -1 : 1);
8283
m_y = static_cast<double>(m_engine->stageHeight()) / 2 - sprite->y() - m_costume->rotationCenterY() * clampedSize / m_costume->bitmapResolution();

0 commit comments

Comments
 (0)