Commit c6119f6d authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Don't manage non-floating-point spaces

parent 589b5c64
......@@ -325,7 +325,9 @@ KoColor KisVisualColorSelectorShape::convertShapeCoordinateToKoColor(QPointF coo
c.colorSpace()->normalisedChannelsValue(c.data(), channelValues);
QVector <qreal> maxvalue(c.colorSpace()->channelCount());
maxvalue.fill(1.0);
if (m_d->displayRenderer && m_d->displayRenderer->getPaintingColorSpace()==m_d->cs) {
if (m_d->displayRenderer
&& m_d->displayRenderer->getPaintingColorSpace()==m_d->cs
&& m_d->cs->colorDepthId().id().contains("f")) {
for (int ch = 0; ch<maxvalue.size(); ch++) {
KoChannelInfo *channel = m_d->cs->channels()[ch];
maxvalue[ch] = m_d->displayRenderer->maxVisibleFloatValue(channel);
......@@ -407,7 +409,9 @@ QPointF KisVisualColorSelectorShape::convertKoColorToShapeCoordinate(KoColor c)
m_d->cs->normalisedChannelsValue(c.data(), channelValues);
QVector <qreal> maxvalue(c.colorSpace()->channelCount());
maxvalue.fill(1.0);
if (m_d->displayRenderer && m_d->displayRenderer->getPaintingColorSpace()==m_d->cs) {
if (m_d->displayRenderer
&& m_d->displayRenderer->getPaintingColorSpace()==m_d->cs
&& m_d->cs->colorDepthId().id().contains("f")) {
for (int ch = 0; ch<maxvalue.size(); ch++) {
KoChannelInfo *channel = m_d->cs->channels()[ch];
maxvalue[ch] = m_d->displayRenderer->maxVisibleFloatValue(channel);
......
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