Fix for bug "lost frames if you add too many hold frames"
ClosedPublic

Authored by scottpetrovic on Mar 30 2019, 9:31 PM.

Details

Reviewers
dkazakov
Group Reviewers
Krita
Summary

Fixes this bug
https://bugs.kde.org/show_bug.cgi?id=404246

Right now if you have a bunch of keyframes, select all the frames, right click, hold frames, add multiple hold frames

The frames can get truncated once they go outside the active animation timeline area.

This patch changes the active timeline area so it can fit all the available frames

Test Plan

Create an animation file with 10 or 11 frames of content.

Select all the frames, right click, hold frames, add multiple hold frames
Make it something like 30 frames and click ok

Result:
The timeline is expanded and the frames should all be there

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
scottpetrovic created this revision.Mar 30 2019, 9:31 PM
Restricted Application added a project: Krita. ยท View Herald TranscriptMar 30 2019, 9:31 PM
scottpetrovic requested review of this revision.Mar 30 2019, 9:31 PM
dkazakov accepted this revision.Apr 1 2019, 10:17 AM
dkazakov added a subscriber: dkazakov.

Hi, @scottpetrovic!

The patch works fine, please push it without further review :)

Initially I felt a bit unsure about the amount of columns you add to the timeline (I would personally use calculateSelectionMetrics() and then calculate the difference (maxColumn - minColumn)), but then I found the call to slotUpdateInfiniteFramesCount() and understood everything :) It looks fine. Though I would add a bit more words telling that "we add excessive maximum number of frames, which will be trimmed later".

plugins/dockers/animation/timeline_frames_view.cpp
1436

Please be more careful with spaces, there should be exactly one space around mathematical operators :)

This revision is now accepted and ready to land.Apr 1 2019, 10:17 AM
scottpetrovic closed this revision.Apr 1 2019, 11:32 PM

did a bit more commenting and fixed the white space.

This is pushed out...closing.

thanks for the reviews @dkazakov