Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix enabling toggles for sRGB conversion when save color info is deactivated.

Wolthera van Hövell tot Westerflier9762d53d26d6
diff --git a/plugins/impex/png/kis_png_export.cc b/plugins/impex/png/kis_png_export.cc
index c5965cca61..dcfb9d931c 100644
--- a/plugins/impex/png/kis_png_export.cc
+++ b/plugins/impex/png/kis_png_export.cc
@@ -151,8 +151,9 @@ KisWdgOptionsPNG::KisWdgOptionsPNG(QWidget *parent)
{
setupUi(this);
- connect(cmbFloatingConversion, SIGNAL(activated(int)), this, SLOT(on_conversion_policy_changed()));
- connect(chkCICP, SIGNAL(toggled(bool)), this, SLOT(on_conversion_policy_changed()));
+ connect(cmbFloatingConversion, SIGNAL(activated(int)), this, SLOT(onConversionPolicyChanged()));
+ connect(chkCICP, SIGNAL(toggled(bool)), this, SLOT(onConversionPolicyChanged()));
+ connect(gbSaveColorInfo, SIGNAL(toggled(bool)), this, SLOT(onConversionPolicyChanged()));
}
void KisWdgOptionsPNG::setConfiguration(const KisPropertiesConfigurationSP cfg)
@@ -257,7 +258,7 @@ void KisWdgOptionsPNG::setConfiguration(const KisPropertiesConfigurationSP cfg)
chkDownsample->setChecked(cfg->getBool("downsample", false));
- on_conversion_policy_changed();
+ onConversionPolicyChanged();
}
KisPropertiesConfigurationSP KisWdgOptionsPNG::configuration() const
@@ -304,9 +305,9 @@ void KisWdgOptionsPNG::on_alpha_toggled(bool checked)
bnTransparencyFillColor->setEnabled(!checked);
}
-void KisWdgOptionsPNG::on_conversion_policy_changed()
+void KisWdgOptionsPNG::onConversionPolicyChanged()
{
- cmbFloatingConversion->setEnabled(m_floatingPoint && chkCICP->isChecked());
+ cmbFloatingConversion->setEnabled(m_floatingPoint && (chkCICP->isChecked() && chkCICP->isEnabled()));
const QString conversionMode = cmbFloatingConversion->currentData(Qt::UserRole+1).toString();
if (cmbFloatingConversion->isEnabled()) {
chkForceSRGB->setEnabled(conversionMode == "KeepSame");
diff --git a/plugins/impex/png/kis_png_export.h b/plugins/impex/png/kis_png_export.h
index 905b63c188..f25c8d4131 100644
--- a/plugins/impex/png/kis_png_export.h
+++ b/plugins/impex/png/kis_png_export.h
@@ -24,7 +24,7 @@ public:
private Q_SLOTS:
void on_alpha_toggled(bool checked);
- void on_conversion_policy_changed();
+ void onConversionPolicyChanged();
private:
bool m_floatingPoint {false};