Kaydet (Commit) 1fb688b2 authored tarafından Brian Fraser's avatar Brian Fraser Kaydeden (comit) Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e14c7fa6
...@@ -2969,7 +2969,7 @@ void MainSequence::init() ...@@ -2969,7 +2969,7 @@ void MainSequence::init()
mnSequenceType = EffectNodeType::MAIN_SEQUENCE; mnSequenceType = EffectNodeType::MAIN_SEQUENCE;
maTimer.SetInvokeHandler( LINK(this, MainSequence, onTimerHdl) ); maTimer.SetInvokeHandler( LINK(this, MainSequence, onTimerHdl) );
maTimer.SetTimeout(500); maTimer.SetTimeout(50);
mxChangesListener.set( new AnimationChangeListener( this ) ); mxChangesListener.set( new AnimationChangeListener( this ) );
...@@ -3356,7 +3356,7 @@ IMPL_LINK_NOARG(MainSequence, onTimerHdl, Timer *, void) ...@@ -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() void MainSequence::startRecreateTimer()
{ {
if( !mbRebuilding && (mbIgnoreChanges == 0) ) if( !mbRebuilding && (mbIgnoreChanges == 0) )
...@@ -3366,7 +3366,10 @@ void MainSequence::startRecreateTimer() ...@@ -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() void MainSequence::startRebuildTimer()
{ {
mbTimerMode = true; mbTimerMode = true;
......
...@@ -136,28 +136,29 @@ private: ...@@ -136,28 +136,29 @@ private:
const CustomAnimationPresets* mpCustomAnimationPresets; const CustomAnimationPresets* mpCustomAnimationPresets;
VclPtr<PushButton> mpPBAddEffect; // UI Elements
VclPtr<PushButton> mpPBRemoveEffect; VclPtr<FixedText> mpFTAnimation;
VclPtr<FixedText> mpFTEffect; VclPtr<CustomAnimationList> mpCustomAnimationList;
VclPtr<FixedText> mpFTStart; VclPtr<PushButton> mpPBAddEffect;
VclPtr<ListBox> mpLBStart; VclPtr<PushButton> mpPBRemoveEffect;
VclPtr<FixedText> mpFTProperty; VclPtr<PushButton> mpPBMoveUp;
VclPtr<VclHBox> mpPlaceholderBox; VclPtr<PushButton> mpPBMoveDown;
VclPtr<PropertyControl> mpLBProperty; VclPtr<FixedText> mpFTCategory;
VclPtr<PushButton> mpPBPropertyMore; VclPtr<ListBox> mpLBCategory;
VclPtr<FixedText> mpFTDuration; 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<MetricBox> mpCBXDuration;
VclPtr<FixedText> mpFTStartDelay; VclPtr<FixedText> mpFTStartDelay;
VclPtr<MetricField> mpMFStartDelay; VclPtr<MetricField> mpMFStartDelay;
VclPtr<CustomAnimationList> mpCustomAnimationList; VclPtr<CheckBox> mpCBAutoPreview;
VclPtr<PushButton> mpPBMoveUp; VclPtr<PushButton> mpPBPlay;
VclPtr<PushButton> mpPBMoveDown;
VclPtr<PushButton> mpPBPlay;
VclPtr<CheckBox> mpCBAutoPreview;
VclPtr<FixedText> mpFTCategory;
VclPtr<ListBox> mpLBCategory;
VclPtr<FixedText> mpFTAnimation;
VclPtr<CategoryListBox> mpLBAnimation;
OUString maStrModify; OUString maStrModify;
OUString maStrProperty; OUString maStrProperty;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment