Bug 424793 - z-level lost when saving reference images to a .kra file.
Summary: z-level lost when saving reference images to a .kra file.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Reference Images (show other bugs)
Version: 4.3.0
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 11:01 UTC by daniele.dente
Modified: 2020-08-06 17:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Video documenting the bug in issue 424793 (637.74 KB, video/mp4)
2020-07-29 13:45 UTC, daniele.dente
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daniele.dente 2020-07-29 11:01:32 UTC
SUMMARY

If a new reference image is added, if added from an existing file or copied from clipboard, then the image can't be brought up to foreground by clicking on it / moving it around, unless the project is saved and the program is restarted. This is a bug, since reference images that were added before restarting krita follow a normal behavior. The image can't be brought to foreground by moving it, nor is it brought to the background when other reference images are moved above it.

STEPS TO REPRODUCE
1. Add 2 reference images with the Reference image tool
2. Try to move the one that is on the layer below on top of the other, it won't snap to foreground
3. Save the project and restart Krita
4. Open the project and add another reference image
5. The first 2 images interact fine among themselves, but not with the newly added one
6. If krita is restarted again and the project reopened, the images interact normally

OBSERVED RESULT
A newly added reference image doesn't follow the layering behavior that previously added images follow

EXPECTED RESULT
The images follow the same behavior without need for a program restart

SOFTWARE/OS VERSIONS
Windows: 10
(available in About System)
Comment 1 Halla Rempt 2020-07-29 11:38:56 UTC
I am sorry, but I cannot reproduce this. I dropped three images on an open document and selected add as reference images, and the lower/raise/front/back right-click menu actions all worked fine.

Are you adding the reference images one by one, and using drag & drop from a file manager, or with the add reference images button?
Comment 2 daniele.dente 2020-07-29 13:45:22 UTC
Created attachment 130488 [details]
Video documenting the bug in issue 424793

Excuse the poor quality but it had to be under 4MB
Comment 3 daniele.dente 2020-07-29 13:46:33 UTC
I'm sorry if i wasn't clear, the right click options work fine, it's the automatic "bring to foreground" behavior that doesn't work unless the program is restarted, i've attached a video to demonstrate
Comment 4 Halla Rempt 2020-07-29 14:20:42 UTC
Ah... But that's actually a bug! I guess that after saving/loading, the reference images are all on the same level, having lost their position on the z-axis...
Comment 5 daniele.dente 2020-07-29 15:17:50 UTC
Um, should I do anything else to help fix the bug or is this enough information?
Comment 6 Halla Rempt 2020-07-29 15:31:11 UTC
No, we've got a confirmed bug here, thanks for reporting!
Comment 7 wolthera 2020-08-06 15:19:19 UTC
Git commit ffed60b76911e0ed2fc8d07d68d82d36e2a241e3 by Wolthera van Hövell tot Westerflier.
Committed on 06/08/2020 at 15:19.
Pushed by woltherav into branch 'krita/4.3'.

Fix setting z-index for reference images when loading or adding to a document.

M  +1    -0    plugins/impex/libkra/kis_kra_loader.cpp
M  +16   -1    plugins/tools/defaulttool/referenceimagestool/ToolReferenceImages.cpp

https://invent.kde.org/graphics/krita/commit/ffed60b76911e0ed2fc8d07d68d82d36e2a241e3
Comment 8 wolthera 2020-08-06 17:36:39 UTC
Git commit 823b3b0b875e20c986b7325ab9d8e2daf698835a by Wolthera van Hövell tot Westerflier.
Committed on 06/08/2020 at 15:18.
Pushed by woltherav into branch 'master'.

Fix setting z-index for reference images when loading or adding to a document.

M  +1    -0    plugins/impex/libkra/kis_kra_loader.cpp
M  +16   -1    plugins/tools/defaulttool/referenceimagestool/ToolReferenceImages.cpp

https://invent.kde.org/graphics/krita/commit/823b3b0b875e20c986b7325ab9d8e2daf698835a