Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions libimageviewer/slideshow/imageanimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class LibImageAnimationPrivate : public QWidget
void startSingleNextAnimation();
void startSinglePreAnimation();
void startStatic();
void forceStopCurrentAnimation();
void endSlide()
{
if (m_staticTimer) {
Expand Down Expand Up @@ -534,24 +535,20 @@ void LibImageAnimationPrivate::startAnimation()

void LibImageAnimationPrivate::startSingleNextAnimation()
{
if (m_isAnimationIng) {
m_isAnimationIng = false;
} else {
setImage1(m_imageName2);
setImage2(queue->jumpTonext());
startAnimation();
}
if (m_isAnimationIng)
forceStopCurrentAnimation();
setImage1(m_imageName2);
setImage2(queue->jumpTonext());
startAnimation();
}

void LibImageAnimationPrivate::startSinglePreAnimation()
{
if (m_isAnimationIng) {
m_isAnimationIng = false;
} else {
setImage1(m_imageName2);
setImage2(queue->jumpTopre());
startAnimation();
}
if (m_isAnimationIng)
forceStopCurrentAnimation();
setImage1(m_imageName2);
setImage2(queue->jumpTopre());
startAnimation();
}

void LibImageAnimationPrivate::startStatic()
Expand All @@ -565,6 +562,20 @@ void LibImageAnimationPrivate::startStatic()
m_staticTimer->start(SLIDER_TIME);
}

void LibImageAnimationPrivate::forceStopCurrentAnimation()
{
if (m_continuousanimationTimer) {
m_continuousanimationTimer->stop();
m_continuousanimationTimer->setInterval(0);
m_factor = 0.0f;
m_isAnimationIng = false;
}
if (m_staticTimer) {
m_staticTimer->stop();
m_staticTimer->setInterval(0);
}
}

void LibImageAnimationPrivate::onContinuousAnimationTimer()
{
Q_Q(LibImageAnimation);
Expand Down
2 changes: 1 addition & 1 deletion libimageviewer/unionimage/unionimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
#include <QDebug>
#include <QUuid>

#include "unionimage/imageutils.h"

Check warning on line 25 in libimageviewer/unionimage/unionimage.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "unionimage/imageutils.h" not found.

Check warning on line 25 in libimageviewer/unionimage/unionimage.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: "unionimage/imageutils.h" not found.
extern "C" {
#include "3rdparty/tiff-tools/converttiff.h"
#include "../../3rdparty/tiff-tools/converttiff.h"
}

#include <cstring>

Check warning on line 30 in libimageviewer/unionimage/unionimage.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <cstring> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 30 in libimageviewer/unionimage/unionimage.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <cstring> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#define SAVE_QUAITY_VALUE 100

Expand Down
Loading