summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-08 18:01:26 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-09-09 06:51:03 +0100
commit85557c1c7fd672ab2156d92c6e164f55f5650ea3 (patch)
treec4ba1602c18d7471cba126e8ae56b08e5dca77f0 /sd
parent404d70790ff3b35c116dd5fe172bb9a210d2b367 (diff)
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
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx16
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.hxx1
2 files changed, 15 insertions, 2 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 4175ae588222..a89126cc7a76 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -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) );
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx
index 6ca28ee8fa4b..4740f2453a41 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -77,6 +77,7 @@ private:
void applyToSelectedPages();
void playCurrentEffect();
+ void stopEffects();
void addListener();
void removeListener();