diff options
-rw-r--r-- | slideshow/source/engine/animationnodes/animationcommandnode.cxx | 19 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/animationcommandnode.hxx | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx index 0c9519589ed0..3bd05db936b2 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx @@ -109,6 +109,25 @@ void AnimationCommandNode::activate_st() "AnimationCommandNode::deactivate" ) ); } +void AnimationCommandNode::deactivate_st( NodeState /*eDestState*/ ) +{ + switch( mxCommandNode->getCommand() ) { + // the command toggles the pause status on a media object + case EffectCommands::TOGGLEPAUSE: + { + if( mpShape ) + { + if( mpShape->isPlaying() ) + mpShape->pause(); + else + mpShape->play(); + } + break; + } + + } +} + bool AnimationCommandNode::hasPendingAnimation() const { return mxCommandNode->getCommand() == EffectCommands::STOPAUDIO || mpShape; diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx index 675da7c3b0e8..cf753e001949 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx @@ -46,6 +46,7 @@ protected: private: virtual void activate_st() override; + virtual void deactivate_st( NodeState eDestState ) override; virtual bool hasPendingAnimation() const override; private: |