Kaydet (Commit) 1aa10fcb authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Thorsten Behrens

tdf#121830 TogglePause should reset to original state on deactivate_st ?

is that how it should work, or should there be an additional TogglePause
created at import time to get the apparent intended pause effect

Change-Id: I0573bd8d9534271f2b36d7ab3b8cdc20e0f985a1
Reviewed-on: https://gerrit.libreoffice.org/64548
Tested-by: Jenkins
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 38e35858
......@@ -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;
......
......@@ -46,6 +46,7 @@ protected:
private:
virtual void activate_st() override;
virtual void deactivate_st( NodeState eDestState ) override;
virtual bool hasPendingAnimation() const override;
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment