Remember auto stretch on load

This commit is contained in:
2024-08-27 13:43:17 +02:00
parent e38de510a0
commit 9adfbde512
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -2,6 +2,7 @@
#include <QVBoxLayout>
#include <QDebug>
#include <QToolButton>
#include <QSettings>
#include "imageringlist.h"
const float BLACK_POINT_SIGMA = -2.8f;
@@ -91,6 +92,14 @@ StretchToolbar::StretchToolbar(QWidget *parent) : QToolBar(tr("Stretch toolbar")
m_autoStretchOnLoad = addAction(QIcon(":/nuke_a.png"), tr("Apply auto stretch on load"));
m_autoStretchOnLoad->setCheckable(true);
QSettings settings;
m_autoStretchOnLoad->setChecked(settings.value("stretchtoolbar/autostretch", false).toBool());
}
StretchToolbar::~StretchToolbar()
{
QSettings settings;
settings.setValue("stretchtoolbar/autostretch", m_autoStretchOnLoad->isChecked());
}
void StretchToolbar::stretchImage(Image *img)