Kaydet (Commit) 85557c1c authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Stop transition preview if "No transition" is selected.

Currently a transition preview continues playing until it either
completes, a different transition is selected (in which case the
new preview starts) or the user clicks on the preview. However
when "No transition" is selected whilst a preview is still playing
then the prveview continues to play.

This will also be useful for fdo#36946 which would introduce
categories into the list which themselves aren't valid transitions,
therefore we would want to stop any previews on progress when selecting
a non-transition in the list.

Change-Id: I708fcc017a94173c91cb45bef18255f97debfd57
üst 404d7079
......@@ -874,16 +874,20 @@ void SlideTransitionPane::applyToSelectedPages()
if( ! mbUpdatingControls )
{
::sd::slidesorter::SharedPageSelection pSelectedPages( getSelectedPages());
impl::TransitionEffect aEffect = getTransitionEffectFromControls();
if( ! pSelectedPages->empty())
{
lcl_CreateUndoForPages( pSelectedPages, mrBase );
lcl_ApplyToPages( pSelectedPages, getTransitionEffectFromControls() );
lcl_ApplyToPages( pSelectedPages, aEffect );
mrBase.GetDocShell()->SetModified();
}
if( mpCB_AUTO_PREVIEW->IsEnabled() &&
mpCB_AUTO_PREVIEW->IsChecked())
{
playCurrentEffect();
if (aEffect.mnType) // mnType = 0 denotes no transition
playCurrentEffect();
else
stopEffects();
}
}
}
......@@ -898,6 +902,14 @@ void SlideTransitionPane::playCurrentEffect()
}
}
void SlideTransitionPane::stopEffects()
{
if( mxView.is() )
{
SlideShow::Stop( mrBase );
}
}
void SlideTransitionPane::addListener()
{
Link aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
......
......@@ -77,6 +77,7 @@ private:
void applyToSelectedPages();
void playCurrentEffect();
void stopEffects();
void addListener();
void removeListener();
......
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