diff options
Diffstat (limited to 'sd/source/ui/animations/CustomAnimationPane.cxx')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 1e04f66d8b6a..ab695076ddc2 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -2509,6 +2509,39 @@ void CustomAnimationPane::onSelect() } } +// ICustomAnimationListController +// pEffectInsertBefore may be null if moving to end of list. +void CustomAnimationPane::onDragNDropComplete(CustomAnimationEffectPtr pEffectDragged, CustomAnimationEffectPtr pEffectInsertBefore) +{ + if ( mpMainSequence.get() ) + { + addUndo(); + + MainSequenceRebuildGuard aGuard( mpMainSequence ); + + // Move the dragged effect and any hidden sub-effects + EffectSequence::iterator aIter = mpMainSequence->find( pEffectDragged ); + const EffectSequence::iterator aEnd( mpMainSequence->getEnd() ); + + while( aIter != aEnd ) + { + CustomAnimationEffectPtr pEffect = (*aIter++); + + // Update model with new location (function triggers a rebuild) + // target may be null, which will insert at the end. + mpMainSequence->moveToBeforeEffect( pEffect, pEffectInsertBefore ); + + // Done moving effect and its hidden sub-effects when *next* effect is visible. + if ( mpCustomAnimationList->isVisible( *aIter ) ) + break; + } + + updateControls(); + mrBase.GetDocShell()->SetModified(); + } +} + + void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< MotionPathTag >& xTag ) { MainSequenceRebuildGuard aGuard( mpMainSequence ); |