[krita] plugins/filters/colorsfilters: Show a warning when editing curves created for a different colorspace

Boudewijn Rempt null at kde.org
Thu May 9 13:12:56 BST 2019


Git commit 4f816b7c1433e60d0212736b5f4bcb32483448b7 by Boudewijn Rempt.
Committed on 09/05/2019 at 12:12.
Pushed by rempt into branch 'master'.

Show a warning when editing curves created for a different colorspace

It's the best we can do now; we should label the curves, and only
reset the real color curves, and keep the virtual curves, but the
file format and the structure of the multichannel filter don't
really support that.

This breaks string freeze :-(

CCBUG:397612
CCMAIL:kimageshop at kde.org
CCMAIL:kde-i18n-doc at kde.org

M  +2    -0    plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp

https://invent.kde.org/kde/krita/commit/4f816b7c1433e60d0212736b5f4bcb32483448b7

diff --git a/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp b/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
index a5385239af..5a56750637 100644
--- a/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
+++ b/plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp
@@ -28,6 +28,7 @@
 #include <QComboBox>
 #include <QDomDocument>
 #include <QHBoxLayout>
+#include <QMessageBox>
 
 #include "KoChannelInfo.h"
 #include "KoBasicHistogramProducers.h"
@@ -382,6 +383,7 @@ void KisMultiChannelConfigWidget::setConfiguration(const KisPropertiesConfigurat
             return;
         }
     } else if (cfg->curves().size() > m_virtualChannels.size()) {
+        QMessageBox::warning(this, i18nc("@title:window", "Krita"), i18n("The current configuration was created for a different colorspace and cannot be used. All curves will be reset."));
         warnKrita << "WARNING: trying to load a curve with invalid number of channels!";
         warnKrita << "WARNING:   expected:" << m_virtualChannels.size();
         warnKrita << "WARNING:        got:" << cfg->curves().size();


More information about the kimageshop mailing list