summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Fraser <andthebrain@softfrog.ca>2018-09-26 10:19:11 -0700
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-27 08:38:23 +0200
commit1fb688b2e13da39b8099a3f4ba58dc9aeef8d723 (patch)
tree1f5b498246de2717aa5a33f2e78aed6bcc186c6b
parente14c7fa64eff20bf5fc0a97600a0dd58531e1046 (diff)
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.grandin@collabora.co.uk>
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx9
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.hxx39
2 files changed, 26 insertions, 22 deletions
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;