feat: add option to avoid reset transform when switching between images

It's not enabled for now so it's not available to end-users.
This commit is contained in:
blumia committed 2023-07-09 15:40:15 +08:00
1 parent f96da17e78
commit d4ded92734
6 files changed
+44 -1

No files matched your search

+4
View File
@@ -40,6 +40,9 @@ public:
bool isSceneBiggerThanView() const;
void setEnableAutoFitInView(bool enable = true);
bool avoidResetTransform() const;
void setAvoidResetTransform(bool avoidReset);
static QTransform resetScale(const QTransform & orig);
signals:
@@ -70,6 +73,7 @@ private:
// ... or even more? e.g. "fit/snap width" things...
// Currently it's "no fit" when it's false and "fit when view is smaller" when it's true.
bool m_enableFitInView = false;
bool m_avoidResetTransform = false;
bool m_checkerboardEnabled = false;
bool m_isLastCheckerboardColorInverted = false;
};