Krita animation timeline cursor duplication
ClosedPublic

Authored by fazek on Mar 2 2016, 8:28 AM.

Details

Summary

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.

Test Plan

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.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fazek updated this revision to Diff 2513.Mar 2 2016, 8:28 AM
fazek retitled this revision from to Krita animation timeline cursor duplication.
fazek updated this object.
fazek edited the test plan for this revision. (Show Details)
fazek added a reviewer: dkazakov.
fazek set the repository for this revision to R37 Krita.
This revision was automatically updated to reflect the committed changes.