Commit 2264a44b authored by Sharaf Zaman's avatar Sharaf Zaman
Browse files

Fix Foreground-to-Background color switching of vector objects

If the fg-bg color was swapped rapidly enough, the resulting shape would
often have the same color (rather than it being swapped).

The reason for this being resourceManager would send us signal to change
both fg and bg, but if the delay between them is less than
colorChangedCompressor's timeout, the latter signal would be ignored.
Which would prevent the swapping from happening. The proper solutions
seem to be to either have a compressor at the source (which there does
seem to be) or have separate channel (ie different timers) for different
resources (bg, fg and gradient in *this* case).

parent ff161e4e
Pipeline #245948 passed with stage
in 61 minutes and 56 seconds
......@@ -403,7 +403,7 @@ void KoFillConfigWidget::slotCanvasResourceChanged(int key, const QVariant &valu
: KoFlake::StrokeFill;
d->colorChangedCompressor.start({color.toQColor(), colorSlot});
colorChanged({color.toQColor(), colorSlot});
} else if (checkedId == Gradient && key == KoCanvasResource::ForegroundColor) {
Supports Markdown
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