summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-11-14 00:39:28 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-11-14 00:44:44 +0000
commitb58be9e8f983d1d0ca10a6ebe903c9a6482cefdd (patch)
tree1defe31675c727a850958e200a3725deab0f02ae /sd
parent4a86ac44b5a17b53357f3468a87488a4d3f20f79 (diff)
Fix selection of transition groups with just one variant.
Change-Id: I3a49fd336961b860f4b19b37a8d18cef8e4a5557
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx43
1 files changed, 26 insertions, 17 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index e223d116d6c6..e3fb90c3506f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -772,28 +772,37 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
auto aSelected = rPresetList.begin();
std::advance( aSelected, mpVS_TRANSITION_ICONS->GetSelectItemId() - 1);
- int nVariant = 0;
- bool bFound = false;
- for( auto aIter: rPresetList )
+ if( mpLB_VARIANT->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
{
- if( aIter->getSetId() == (*aSelected)->getSetId() )
+ // Transition with just one effect.
+ aResult = impl::TransitionEffect( **aSelected );
+ aResult.setAllAmbiguous();
+ }
+ else
+ {
+ int nVariant = 0;
+ bool bFound = false;
+ for( auto aIter: rPresetList )
{
- if( mpLB_VARIANT->GetSelectEntryPos() == nVariant)
- {
- aResult = impl::TransitionEffect( *aIter );
- aResult.setAllAmbiguous();
- bFound = true;
- break;
- }
- else
+ if( aIter->getSetId() == (*aSelected)->getSetId() )
{
- nVariant++;
+ if( mpLB_VARIANT->GetSelectEntryPos() == nVariant)
+ {
+ aResult = impl::TransitionEffect( *aIter );
+ aResult.setAllAmbiguous();
+ bFound = true;
+ break;
+ }
+ else
+ {
+ nVariant++;
+ }
}
}
- }
- if( !bFound )
- {
- aResult.mnType = 0;
+ if( !bFound )
+ {
+ aResult.mnType = 0;
+ }
}
aResult.mbEffectAmbiguous = false;
}