Skip to content

434559 - Brush Editor: Fix unchecking share curve resetting curves

Fix for 434559.

The actual fix is very small, but the same thing should happen in both slotModified and slotUseSameCurveChanged so I changed them to match.

There was a comment that said !(UseSameCurve) => UseSameCurve, I don't know what it was supposed to mean. I removed that and the comment beneath it. The code is really self-explanatory without comments.

Now there's two ways to fix this, on unchecking share curve:

  1. Set all sensors to the current (was shared) curve. This was how it currently is in the MR because that's how I initially thought it should work.

But now I'm thinking the following might make more sense.

  1. Set only the current sensor to the current (was shared) curve, others reset to how they were before the curve was shared. If the brush has been saved / or krita restarted between checking unchecking, disabled sensors are reset to the default curve.

KA Poll

Test Plan

Should work as follows:

  1. Turn off share curve.
  2. Modify the curve of a few sensors.
  3. Turn share curve on. Curve should not change.
  4. Switch to other curves: they should all be the curve at step 3.
  5. Modify the other curves, they should all be modifying the same shared curve.
  6. Pick a curve, make a modification, uncheck Share Curve. Curve should not change.
  7. Switch to other curves: how they should be depends on fix picked.
  8. Modify other curves, they should behave independently now.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • [n/a] 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.

@tymond

Edited by Alan North

Merge request reports