sd/source/core/CustomAnimationEffect.cxx | 9 +++-- sd/source/ui/animations/CustomAnimationPane.hxx | 39 ++++++++++++------------ 2 files changed, 26 insertions(+), 22 deletions(-)
New commits: commit 1fb688b2e13da39b8099a3f4ba58dc9aeef8d723 Author: Brian Fraser <andthebr...@softfrog.ca> AuthorDate: Wed Sep 26 10:19:11 2018 -0700 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 27 08:38:23 2018 +0200 tdf#118065 Fix slow Impress custom animation sidebar update Timer MainSequence::maTimer dropped from 500ms to 50ms. Reorder declarations of UI elements in CustomAnimationPane.hxx to be more intuitive and reflect order shown in UI. Change-Id: I2857dbbd6a4131c4ca6f9a054132f34056e95338 Reviewed-on: https://gerrit.libreoffice.org/61019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index f10210ca9c72..1b35a3a48a97 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -2969,7 +2969,7 @@ void MainSequence::init() mnSequenceType = EffectNodeType::MAIN_SEQUENCE; maTimer.SetInvokeHandler( LINK(this, MainSequence, onTimerHdl) ); - maTimer.SetTimeout(500); + maTimer.SetTimeout(50); mxChangesListener.set( new AnimationChangeListener( this ) ); @@ -3356,7 +3356,7 @@ IMPL_LINK_NOARG(MainSequence, onTimerHdl, Timer *, void) } } -/** starts a timer that recreates the internal structure from the API core after 1 second */ +/** starts a timer that recreates the internal structure from the API core */ void MainSequence::startRecreateTimer() { if( !mbRebuilding && (mbIgnoreChanges == 0) ) @@ -3366,7 +3366,10 @@ void MainSequence::startRecreateTimer() } } -/** starts a timer that rebuilds the API core from the internal structure after 1 second */ +/** + * starts a timer that rebuilds the API core from the internal structure + * This is used to reduce the number of screen redraws due to animation changes. +*/ void MainSequence::startRebuildTimer() { mbTimerMode = true; diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx index f1aff2e25cdc..d1e1475b6a92 100644 --- a/sd/source/ui/animations/CustomAnimationPane.hxx +++ b/sd/source/ui/animations/CustomAnimationPane.hxx @@ -136,28 +136,29 @@ private: const CustomAnimationPresets* mpCustomAnimationPresets; - VclPtr<PushButton> mpPBAddEffect; - VclPtr<PushButton> mpPBRemoveEffect; - VclPtr<FixedText> mpFTEffect; - VclPtr<FixedText> mpFTStart; - VclPtr<ListBox> mpLBStart; - VclPtr<FixedText> mpFTProperty; - VclPtr<VclHBox> mpPlaceholderBox; - VclPtr<PropertyControl> mpLBProperty; - VclPtr<PushButton> mpPBPropertyMore; - VclPtr<FixedText> mpFTDuration; + // UI Elements + VclPtr<FixedText> mpFTAnimation; + VclPtr<CustomAnimationList> mpCustomAnimationList; + VclPtr<PushButton> mpPBAddEffect; + VclPtr<PushButton> mpPBRemoveEffect; + VclPtr<PushButton> mpPBMoveUp; + VclPtr<PushButton> mpPBMoveDown; + VclPtr<FixedText> mpFTCategory; + VclPtr<ListBox> mpLBCategory; + VclPtr<FixedText> mpFTEffect; + VclPtr<CategoryListBox> mpLBAnimation; + VclPtr<FixedText> mpFTStart; + VclPtr<ListBox> mpLBStart; + VclPtr<FixedText> mpFTProperty; + VclPtr<PropertyControl> mpLBProperty; + VclPtr<VclHBox> mpPlaceholderBox; + VclPtr<PushButton> mpPBPropertyMore; + VclPtr<FixedText> mpFTDuration; VclPtr<MetricBox> mpCBXDuration; VclPtr<FixedText> mpFTStartDelay; VclPtr<MetricField> mpMFStartDelay; - VclPtr<CustomAnimationList> mpCustomAnimationList; - VclPtr<PushButton> mpPBMoveUp; - VclPtr<PushButton> mpPBMoveDown; - VclPtr<PushButton> mpPBPlay; - VclPtr<CheckBox> mpCBAutoPreview; - VclPtr<FixedText> mpFTCategory; - VclPtr<ListBox> mpLBCategory; - VclPtr<FixedText> mpFTAnimation; - VclPtr<CategoryListBox> mpLBAnimation; + VclPtr<CheckBox> mpCBAutoPreview; + VclPtr<PushButton> mpPBPlay; OUString maStrModify; OUString maStrProperty; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits