Skip to content

Fix soft proofing and image conversion issues

Mathias Wein requested to merge mwein/krita:soft-proofing-fixes into master

This should've been just a fix for canvas update issues when soft proofing is enabled, but kind of turned into an open-heart surgery...

  • BUG:399723

    This was somewhat straight forward, the original settings in the image were manipulated through the shared pointer and hence affected other views. So I changed it to make a copy for each canvas.

  • BUG:441165 & BUG:426641

    This is where it got complicated. First part that caused corruption and possible crashes was that the color transform was not recreated as necessary. But it would still show a corrupted image briefly. It turned out to be part of a bugfix for Bug 329336, but looked rather unconventional (to not say "scary"). It seemed to be just a strange way to pass the channel flags to the canvas, but investigating it, it became apparent that color space conversion actually left group layers (including the image root) with invalid flags, which also causes issues outside of soft proofing (like flip of alpha inheritance on group layers).

    I did my best to fix this cleanly, but I'm not very familiar with this whole KisProcessingApplicator stuff. I hope I convered all combinations of converting image color space with and without layer conversion, aswell as converting just individual layers (including nested groups).

Test Plan

Basically, try to reproduce the bugs mentioned above, including the previously fixed 329336, because I had to undo part of it.

That means, convert image/layer color space with soft proofing enabled and also variations of disabled channels in the channels docker.

Expected result is that no canvas corruption occurs and that the (inherit-)alpha channel settings stay intact, while color channel visibility should be reset on color model changes.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports