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++
Make smart patch tool work with HDR canvas.
Wolthera van Hövell tot Westerflier57fb6599ebf1
diff --git a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cppindex 0bea073210..1520cff727 100644--- a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp+++ b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp@@ -26,6 +26,7 @@#include "kis_datamanager.h"#include "KoColorSpaceRegistry.h"+#include <kis_display_color_converter.h>#include <KisCursorOverrideLock.h>#include "kis_tool_smart_patch_options_widget.h"@@ -255,8 +256,10 @@ void KisToolSmartPatch::paint(QPainter &painter, const KoViewConverter &convertepainter.save();painter.setBrush(Qt::magenta);- QImage img = m_d->maskDev->convertToQImage(0);+ KisCanvas2 * kiscanvas = dynamic_cast<KisCanvas2*>(canvas());+ QImage img = kiscanvas->displayColorConverter()->convertImageToDisplayColorSpace(m_d->maskDev);if( !img.size().isEmpty() ){+painter.drawImage(pixelToView(m_d->maskDev->exactBounds()), img);}painter.restore();