[graphics/krita/krita/6.0] plugins/filters/colorsfilters: Fix color adjustment curve input controls on open
Dmitry Kazakov <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 462a30e0a2cadd52a2983b1447335448b3d8d033 by Dmitry Kazakov, on behalf of Moritz Staudinger.
Committed on 27/07/2026 at 13:56.
Pushed by dkazakov into branch 'krita/6.0'.
Fix color adjustment curve input controls on open
setActiveChannel() does nothing if the reset channel is
the same as the current one, so we should resync explicitly.
Fixes #117
M +7 -2 plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
M +1 -0 plugins/filters/colorsfilters/kis_multichannel_filter_base.h
https://invent.kde.org/graphics/krita/-/commit/462a30e0a2cadd52a2983b1447335448b3d8d033
diff --git a/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp b/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
index 29020ef2045..d967b5608b3 100644
--- a/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
+++ b/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
@@ -434,12 +434,11 @@ void KisMultiChannelConfigWidget::init() {
m_histogram = new KisHistogram(m_dev, m_dev->exactBounds(), hpf->generate(), LINEAR);
}
- m_page->curveWidget->setCurve(m_curves[0]);
connect(m_page->curveWidget, SIGNAL(modified()), this, SLOT(slotCurveModified()));
{
KisSignalsBlocker b(m_page->curveWidget);
- setActiveChannel(0);
+ syncActiveChannelUi();
}
}
@@ -662,6 +661,12 @@ void KisMultiChannelConfigWidget::setActiveChannel(int ch)
KIS_SAFE_ASSERT_RECOVER_RETURN(ch < m_curves.size());
m_activeVChannel = ch;
+
+ syncActiveChannelUi();
+}
+
+void KisMultiChannelConfigWidget::syncActiveChannelUi()
+{
m_page->curveWidget->setCurve(m_curves[m_activeVChannel]);
m_page->curveWidget->setPixmap(getHistogram());
diff --git a/plugins/filters/colorsfilters/kis_multichannel_filter_base.h b/plugins/filters/colorsfilters/kis_multichannel_filter_base.h
index 3ed92844092..ba2be21c55a 100644
--- a/plugins/filters/colorsfilters/kis_multichannel_filter_base.h
+++ b/plugins/filters/colorsfilters/kis_multichannel_filter_base.h
@@ -127,6 +127,7 @@ protected:
void init();
void resetCurves();
void setActiveChannel(int ch);
+ void syncActiveChannelUi();
virtual int findDefaultVirtualChannelSelection();
virtual void updateChannelControls() = 0;