Commit 73057eea authored by Wolthera van Hövell's avatar Wolthera van Hövell 📚

BUG:410308 Fix logic on seperate image dialog options.

The behaviour is now that on 8bit downscaling is always disabled.
On sixteen bit it is only possible when outputting to grayscale,
which is consistent with the actual code in kis_channel_seperation.
parent 32e10c8f
......@@ -49,7 +49,7 @@ DlgSeparate::DlgSeparate(const QString & imageCS,
m_page->grpOutput->hide();
connect(m_page->radioCurrentLayer, SIGNAL(toggled(bool)), this, SLOT(slotSetColorSpaceLabel()));
connect(m_page->radioAllLayers, SIGNAL(toggled(bool)), this, SLOT(slotSetColorSpaceLabel()));
connect(m_page->chkColors, SIGNAL(toggled(bool)), m_page->chkDownscale, SLOT(setDisabled(bool)));
connect(m_page->chkColors, SIGNAL(toggled(bool)), this, SLOT(disableDownScaleIfPossible(bool)));
connect(this, SIGNAL(okClicked()),
this, SLOT(okClicked()));
......@@ -101,6 +101,13 @@ void DlgSeparate::okClicked()
accept();
}
void DlgSeparate::disableDownScaleIfPossible(bool disable)
{
if (m_canDownScale) {
m_page->chkDownscale->setDisabled(disable);
}
}
void DlgSeparate::slotSetColorSpaceLabel()
{
if (m_page->radioCopyAlpha->isChecked()) {
......@@ -111,6 +118,7 @@ void DlgSeparate::slotSetColorSpaceLabel()
}
void DlgSeparate::enableDownscale(bool enable)
{
m_canDownScale = enable;
m_page->chkDownscale->setEnabled(enable);
}
......@@ -63,12 +63,14 @@ private Q_SLOTS:
void slotSetColorSpaceLabel();
void okClicked();
void disableDownScaleIfPossible(bool disable);
private:
WdgSeparations * m_page;
QString m_imageCS;
QString m_layerCS;
bool m_canDownScale {true};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment