Diffusion Krita 593ec09be7ed

Fix Krita animation timeline cursor duplication

Authored by fazek on Mar 4 2016, 6:43 AM.

Description

Fix Krita animation timeline cursor duplication

When you create or load an animation and first you click on the headline
of the timeline (the ruler with the frame numbers, not the actual
layers) and drag the cursor, it behaves strangely: the previous cursor
is not erased, and a new duplicate cursor image placed on the touched
frames.

The reason for this: before you click on a layer at least once, the
index structure of the selected row is in invalid status and it returns
-1 for its row() value. So the setCurrentIndex() function cannot replace
the cursor correctly. My solution is used many times elsewhere in the
same source file.

Testplan:

The timeline docker must be visible. Create a new document. Click on the
headline of the timeline (the ruler with the frame numbers) and drag the
cursor. It behaves strangely. If you click on a layer to replace the
cursor, after that the headline also works as expected. My patch fixes
this.

Differential Revision: https://phabricator.kde.org/D1048

Details

Committed
dkazakovMar 4 2016, 6:48 AM
Differential Revision
D1048: Krita animation timeline cursor duplication
Parents
R37:fb013b7eae29: Implement optimized RGBF32 alpha darken composite
Branches
Unknown
Tags
Unknown