summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/animatedsprite.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/animatedsprite.cxx')
-rw-r--r--slideshow/source/engine/animatedsprite.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/slideshow/source/engine/animatedsprite.cxx b/slideshow/source/engine/animatedsprite.cxx
index 46379897168a..481a625afe7a 100644
--- a/slideshow/source/engine/animatedsprite.cxx
+++ b/slideshow/source/engine/animatedsprite.cxx
@@ -119,34 +119,34 @@ namespace slideshow
bNeedResize = true;
}
- if( bNeedResize )
+ if( !bNeedResize )
+ return;
+
+ // as the old sprite might have already been altered
+ // (and therefore been placed in the update list of
+ // the spritecanvas for this frame), must hide it
+ // here, to ensure it's not visible on screen any
+ // longer.
+ mpSprite->hide();
+
+ maEffectiveSpriteSizePixel = aNewSize;
+ mpSprite = mpViewLayer->createSprite( maEffectiveSpriteSizePixel,
+ mnSpritePrio );
+
+ ENSURE_OR_THROW( mpSprite,
+ "AnimatedSprite::resize(): Could not create new sprite" );
+
+ // set attributes similar to previous sprite
+ if (mbSpriteVisible)
{
- // as the old sprite might have already been altered
- // (and therefore been placed in the update list of
- // the spritecanvas for this frame), must hide it
- // here, to ensure it's not visible on screen any
- // longer.
- mpSprite->hide();
-
- maEffectiveSpriteSizePixel = aNewSize;
- mpSprite = mpViewLayer->createSprite( maEffectiveSpriteSizePixel,
- mnSpritePrio );
-
- ENSURE_OR_THROW( mpSprite,
- "AnimatedSprite::resize(): Could not create new sprite" );
-
- // set attributes similar to previous sprite
- if (mbSpriteVisible)
- {
- mpSprite->show();
- mpSprite->setAlpha( mnAlpha );
-
- if( maPosPixel )
- mpSprite->movePixel( *maPosPixel );
-
- if( maClip )
- mpSprite->setClip( *maClip );
- }
+ mpSprite->show();
+ mpSprite->setAlpha( mnAlpha );
+
+ if( maPosPixel )
+ mpSprite->movePixel( *maPosPixel );
+
+ if( maClip )
+ mpSprite->setClip( *maClip );
}
}