Commit 1d633079 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix undoing selection modifications when Mask Mode is active

We should not create a non-const iterator over a device when doing
a read-only operation not-in-a-stroke-context thread

BUG:391086
parent c3f18984
......@@ -472,9 +472,9 @@ QImage deviceToQImage(KisPaintDeviceSP device,
QColor color = maskColor;
const qreal alphaScale = maskColor.alphaF();
KisSequentialIterator it(device, rc);
KisSequentialConstIterator it(device, rc);
while(it.nextPixel()) {
quint8 value = (MAX_SELECTED - *(it.rawData())) * alphaScale;
quint8 value = (MAX_SELECTED - *(it.rawDataConst())) * alphaScale;
color.setAlpha(value);
QPoint pt(it.x(), it.y());
......
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