Fix integer overflow issues in shape reordering algorithm
Open, Needs TriagePublic

Description

The code in KoShapeReorderCommand::createCommand() works incorrectly if zIndex of one of the shapes has maximum or minimum value (it is stored in qint16). The algorithm should safely handle the case by adjusting the indexes of all the shapes when necessary

IMPORTANT: the algorithm should change zIndex of shapes as little as possible, it should happen only when necessary. If we just renumber the shapes every time, then the user will lack ability of copy-paste shapes smoothly.

hi @dkazakov I want to contribute in this issue, if its not completed. Please reply!

cubix added a subscriber: cubix.Oct 20 2020, 6:17 AM

Hi, I am new to krita development. Can I work on this?

rempt added a comment.Oct 20 2020, 8:30 AM

Cubix, please select one thing to start on, not three.

cubix added a comment.Oct 20 2020, 1:59 PM

Sorry. I'll start with this issue.