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

parent c3f18984
...@@ -472,9 +472,9 @@ QImage deviceToQImage(KisPaintDeviceSP device, ...@@ -472,9 +472,9 @@ QImage deviceToQImage(KisPaintDeviceSP device,
QColor color = maskColor; QColor color = maskColor;
const qreal alphaScale = maskColor.alphaF(); const qreal alphaScale = maskColor.alphaF();
KisSequentialIterator it(device, rc); KisSequentialConstIterator it(device, rc);
while(it.nextPixel()) { while(it.nextPixel()) {
quint8 value = (MAX_SELECTED - *(it.rawData())) * alphaScale; quint8 value = (MAX_SELECTED - *(it.rawDataConst())) * alphaScale;
color.setAlpha(value); color.setAlpha(value);
QPoint pt(it.x(), it.y()); QPoint pt(it.x(), it.y());
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment