Skip to content

Commit 7ec12fe

Browse files
GongHeng2017lichaofan2008
authored andcommitted
fix: [slide-show] The Next button should clicked double.
-- The Next button should clicked double. -- The last animation not stop and logic return. Log: fix issue Bug: https://pms.uniontech.com/bug-view-328371.html v20 BUG 分支合一到v25主线 Task: https://pms.uniontech.com/task-view-383475.html
1 parent 83520d4 commit 7ec12fe

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

libimageviewer/slideshow/imageanimation.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class LibImageAnimationPrivate : public QWidget
119119
void startSingleNextAnimation();
120120
void startSinglePreAnimation();
121121
void startStatic();
122+
void forceStopCurrentAnimation();
122123
void endSlide()
123124
{
124125
if (m_staticTimer) {
@@ -542,6 +543,7 @@ void LibImageAnimationPrivate::startAnimation()
542543

543544
void LibImageAnimationPrivate::startSingleNextAnimation()
544545
{
546+
<<<<<<< HEAD
545547
qDebug() << "Starting single next animation";
546548
if (m_isAnimationIng) {
547549
qDebug() << "Animation already in progress, stopping";
@@ -551,10 +553,18 @@ void LibImageAnimationPrivate::startSingleNextAnimation()
551553
setImage2(queue->jumpTonext());
552554
startAnimation();
553555
}
556+
=======
557+
if (m_isAnimationIng)
558+
forceStopCurrentAnimation();
559+
setImage1(m_imageName2);
560+
setImage2(queue->jumpTonext());
561+
startAnimation();
562+
>>>>>>> 3ba0572 (fix: [slide-show] The Next button should clicked double.)
554563
}
555564

556565
void LibImageAnimationPrivate::startSinglePreAnimation()
557566
{
567+
<<<<<<< HEAD
558568
qDebug() << "Starting single previous animation";
559569
if (m_isAnimationIng) {
560570
qDebug() << "Animation already in progress, stopping";
@@ -564,6 +574,13 @@ void LibImageAnimationPrivate::startSinglePreAnimation()
564574
setImage2(queue->jumpTopre());
565575
startAnimation();
566576
}
577+
=======
578+
if (m_isAnimationIng)
579+
forceStopCurrentAnimation();
580+
setImage1(m_imageName2);
581+
setImage2(queue->jumpTopre());
582+
startAnimation();
583+
>>>>>>> 3ba0572 (fix: [slide-show] The Next button should clicked double.)
567584
}
568585

569586
void LibImageAnimationPrivate::startStatic()
@@ -578,6 +595,20 @@ void LibImageAnimationPrivate::startStatic()
578595
m_staticTimer->start(SLIDER_TIME);
579596
}
580597

598+
void LibImageAnimationPrivate::forceStopCurrentAnimation()
599+
{
600+
if (m_continuousanimationTimer) {
601+
m_continuousanimationTimer->stop();
602+
m_continuousanimationTimer->setInterval(0);
603+
m_factor = 0.0f;
604+
m_isAnimationIng = false;
605+
}
606+
if (m_staticTimer) {
607+
m_staticTimer->stop();
608+
m_staticTimer->setInterval(0);
609+
}
610+
}
611+
581612
void LibImageAnimationPrivate::onContinuousAnimationTimer()
582613
{
583614
Q_Q(LibImageAnimation);

libimageviewer/unionimage/unionimage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "unionimage/imageutils.h"
2626
extern "C" {
27-
#include "3rdparty/tiff-tools/converttiff.h"
27+
#include "../../3rdparty/tiff-tools/converttiff.h"
2828
}
2929

3030
#include <cstring>

0 commit comments

Comments
 (0)