Bug 364942

Summary: First frame of some layers get random offset when saved
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: AnimationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: phaineofcatz
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alvin Wong 2016-06-30 20:21:47 UTC
Sometimes when I open an animation, the first frame of some random layers would get offset.

Happened to me more than a few times, but it only affected the first frame when it happened to me.

It seems to be related to something happening when saving.

Reproducible: Always

Steps to Reproduce:
1. Make an animation
2. Save
3. Close the file
4. Open the file
5. Hope that it can be reproduced?



I can find the offset coordinates (not accounting for the sign) inside `maindoc.xml`.
In one particular case I just checked, in `layername.keyframes.xml`, there is *one* single keyframe that has the same offset, other keyframes all being 0.
Comment 1 joupent 2016-07-01 07:41:43 UTC
Git commit e8a066d6c9ef8be40a9cf24a6210dda97611feb0 by Jouni Pentikäinen.
Committed on 01/07/2016 at 07:39.
Pushed by jounip into branch 'krita/3.0'.

Fix incorrect offset when loading first frame

When loading the first frame, the keyframe channel and paint device are in an
inconsistent state for a brief moment between removing and re-inserting the 
only key. Applying the offset using paintDevice::move(QPoint) would affect
the wrong object (m_data).

M  +1    -1    libs/image/kis_raster_keyframe_channel.cpp

http://commits.kde.org/krita/e8a066d6c9ef8be40a9cf24a6210dda97611feb0
Comment 2 joupent 2016-07-01 08:01:41 UTC
Git commit 5da77610aa28a85775ebce7d7daf8779ef4c8c11 by Jouni Pentikäinen.
Committed on 01/07/2016 at 07:42.
Pushed by jounip into branch 'master'.

Fix incorrect offset when loading first frame

When loading the first frame, the keyframe channel and paint device are in an
inconsistent state for a brief moment between removing and re-inserting the
only key. Applying the offset using paintDevice::move(QPoint) would affect
the wrong object (m_data).

M  +1    -1    libs/image/kis_raster_keyframe_channel.cpp

http://commits.kde.org/krita/5da77610aa28a85775ebce7d7daf8779ef4c8c11
Comment 3 Halla Rempt 2016-07-01 10:50:08 UTC
*** Bug 363963 has been marked as a duplicate of this bug. ***