Commit 0cc84daa authored by Anna Medonosová's avatar Anna Medonosová Committed by Anna Medonosová

Show gamut mask in the on-canvas color selector

If a gamut mask is active, it is also shown in the on-canvas popup
selector (default Shift+I).
parent 35d78951
......@@ -35,6 +35,7 @@
#include <kis_debug.h>
#include <KoCanvasResourceProvider.h>
#include <kis_canvas_resource_provider.h>
#include <kis_icon.h>
#include "kis_color_selector_ring.h"
......@@ -152,6 +153,20 @@ void KisColorSelector::updateSettings()
KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
setConfiguration(KisColorSelectorConfiguration::fromString(cfg.readEntry("colorSelectorConfiguration", KisColorSelectorConfiguration().toString())));
if (m_canvas && m_canvas->viewManager() && m_canvas->viewManager()->canvasResourceProvider()) {
bool gamutMaskActive = m_canvas->viewManager()->canvasResourceProvider()->gamutMaskActive();
qDebug() << "KisColorSelector::updateSettings()" << gamutMaskActive;
if (gamutMaskActive) {
KoGamutMask* currentMask = m_canvas->viewManager()->canvasResourceProvider()->currentGamutMask();
if (currentMask) {
slotGamutMaskSet(currentMask);
}
} else {
slotGamutMaskToggle(false);
}
}
}
void KisColorSelector::slotGamutMaskSet(KoGamutMask *gamutMask)
......
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