summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Fraser <andthebrain@softfrog.ca>2018-09-18 12:53:37 -0700
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-10-02 07:33:00 +0200
commitdc7ae0c3647670b55347be8abe483423e77d11ee (patch)
tree327009f8d31c3bca667424340193b080cb92f544
parent52cb73911e661fb636085337374e09845f07783b (diff)
Presurve rolled-up custom animation order when reordering
Fixes bug 119835 Change-Id: I3d2cb7f0e5d7d7c902878b77e64fa113b6e10c12 Reviewed-on: https://gerrit.libreoffice.org/60707 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 6fa5f9aefeb0..8277c4607802 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2385,7 +2385,12 @@ void CustomAnimationPane::moveSelection( bool bUp )
if( aInsertPos != rEffectSequence.end() )
{
++aInsertPos;
- while( (aInsertPos != rEffectSequence.end()) && !mpCustomAnimationList->isExpanded(*aInsertPos))
+ // Advance over rolled-up (un-expanded) items, unless we just moved it there.
+ while( (aInsertPos != rEffectSequence.end())
+ && !mpCustomAnimationList->isExpanded(*aInsertPos)
+ && (std::find(maListSelection.begin(), maListSelection.end(), *aInsertPos)
+ == maListSelection.end())
+ )
++aInsertPos;
rEffectSequence.insert( aInsertPos, pEffect );