Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Don't fetch if position still same
Dat Le6ef7f97026aa
diff --git a/libs/ui/tool/KisAsyncColorSamplerHelper.cpp b/libs/ui/tool/KisAsyncColorSamplerHelper.cppindex 4ad99c522a..a70fc64221 100644--- a/libs/ui/tool/KisAsyncColorSamplerHelper.cpp+++ b/libs/ui/tool/KisAsyncColorSamplerHelper.cpp@@ -731,14 +731,14 @@ QImage KisAsyncColorSamplerHelper::fetchCanvasPreview(QRect &canvasPixelRect) {}// If not already have a job fetching canvas image, then do it- if (!m_d->canvasPreviewFetchingStarted) {+ if (!m_d->canvasPreviewFetchingStarted && m_d->cacheCanvasPreviewRect != canvasPixelRect) {m_d->canvasPreviewFetchingStarted = true;m_d->strokesFacade()->addJob(m_d->strokeId,new KisColorSamplerStrokeStrategy::GenerateCanvasZoomPreviewData(m_d->canvas, canvasPixelRect));}// Render the last frame if available- if (!m_d->cacheCanvasPreviewRect.isNull()) canvasPixelRect = m_d->cacheCanvasPreviewRect;+ if (!m_d->cacheCanvasPreviewRect.isNull()) canvasPixelRect = QRect(QPoint(0,0), m_d->cacheCanvasPreviewRect.size());return m_d->cacheCanvasPreviewImage;}diff --git a/libs/ui/tool/strokes/kis_color_sampler_stroke_strategy.cpp b/libs/ui/tool/strokes/kis_color_sampler_stroke_strategy.cppindex dbf9aec6fb..13a43057c3 100644--- a/libs/ui/tool/strokes/kis_color_sampler_stroke_strategy.cpp+++ b/libs/ui/tool/strokes/kis_color_sampler_stroke_strategy.cpp@@ -65,7 +65,7 @@ void KisColorSamplerStrokeStrategy::doStrokeCallback(KisStrokeJobData *data)QImage image = previewData->canvas->displayColorConverter()->convertImageToDisplayColorSpace(tmpDev, previewData->canvasPixelRect, true);- Q_EMIT sigCanvasZoomPreviewUpdated(image, QRect(QPoint(0,0), previewData->canvasPixelRect.size()));+ Q_EMIT sigCanvasZoomPreviewUpdated(image, previewData->canvasPixelRect);}}