Commit 5ff00b07 authored by Mathias Wein's avatar Mathias Wein Committed by Boudewijn Rempt

Fix color selector update issue

Even though the color may not change e.g. on hue change when
saturation is zero, the other selector shape still needs to
update its background when hue changes.
parent ed121561
......@@ -510,22 +510,19 @@ void KisVisualColorSelector::slotCursorMoved(QPointF pos)
Q_ASSERT(shape);
QVector<int> channels = shape->getChannels();
m_d->channelValues[channels.at(0)] = pos.x();
if (shape->getDimensions() == KisVisualColorSelectorShape::twodimensional)
{
if (shape->getDimensions() == KisVisualColorSelectorShape::twodimensional) {
m_d->channelValues[channels.at(1)] = pos.y();
}
KoColor newColor = convertShapeCoordsToKoColor(m_d->channelValues);
if (newColor != m_d->currentcolor)
{
if (newColor != m_d->currentcolor) {
m_d->currentcolor = newColor;
Q_FOREACH (KisVisualColorSelectorShape *widget, m_d->widgetlist) {
if (widget != shape){
widget->setChannelValues(m_d->channelValues, false);
}
}
emit sigNewColor(m_d->currentcolor);
}
Q_FOREACH (KisVisualColorSelectorShape *widget, m_d->widgetlist) {
if (widget != shape){
widget->setChannelValues(m_d->channelValues, false);
}
}
}
void KisVisualColorSelector::resizeEvent(QResizeEvent *) {
......
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