From 2264a44becad163a94ba26bdea3f054d205295b1 Mon Sep 17 00:00:00 2001 From: Sharaf Zaman Date: Fri, 16 Sep 2022 15:00:31 +0000 Subject: [PATCH] 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). BUG:458913 --- libs/ui/widgets/KoFillConfigWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ui/widgets/KoFillConfigWidget.cpp b/libs/ui/widgets/KoFillConfigWidget.cpp index 0ff338012c..76a5e1e32b 100644 --- a/libs/ui/widgets/KoFillConfigWidget.cpp +++ b/libs/ui/widgets/KoFillConfigWidget.cpp @@ -403,7 +403,7 @@ void KoFillConfigWidget::slotCanvasResourceChanged(int key, const QVariant &valu : KoFlake::StrokeFill; d->colorAction->setCurrentColor(color); - d->colorChangedCompressor.start({color.toQColor(), colorSlot}); + colorChanged({color.toQColor(), colorSlot}); } else if (checkedId == Gradient && key == KoCanvasResource::ForegroundColor) { d->ui->wdgGradientEditor->notifyGlobalColorChanged(color); } -- GitLab