Commit d52c63a8 authored by Mathias Wein's avatar Mathias Wein

Fix color selector update issue

Even though the color may not change when e.g. saturation is zero,
the other selector shape still needs to update its background
when hue changes etc.
parent 07c6d51d
......@@ -520,22 +520,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