| Summary: | Cannot Link to Image (grayed out) reference file when inserting it via drag-and-drop | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | huulong |
| Component: | General | Assignee: | Tiar <tamtamy.tymona> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | griffinvalley, tamtamy.tymona |
| Priority: | NOR | Keywords: | triaged |
| Version First Reported In: | 5.1.1 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/commit/485e586f6bdde3afff121d72f93def5327d51def | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Screenshot of Link to Image being grayed out | ||
|
Description
huulong
2022-10-06 17:07:40 UTC
Hi, thank you for your report. I can confirm with the Krita Version: 5.2.0-prealpha (git 5c98a72) Appimage with Qt 5.15.7. Oddly enough, I noticed that if you drag multiple files at once as References, the bug does *not* occur. So this is another workaround, although I really don't see a reason for that. Git commit 485e586f6bdde3afff121d72f93def5327d51def by Agata Cacko. Committed on 28/02/2023 at 21:49. Pushed by tymond into branch 'master'. Fix disabled Link to Image in Ref Tool after drag-and-drop Before this commit, there was no way to link the new reference image to the original file, because Krita were forgetting the url. This commit fixes that. Notes: - you can only choose Link to Image after adding the new reference image. If you still use the Embed in .kra option and save and reopen, then the location will be forgotten and there won't be a way to Link it to Image again. (possible improvement: don't forget the location). - in theory, the image displayed in Krita might be different before and after saving and reopening, because before it will be loading the file from clipboard, and the code there is pretty complicated (it doesn't always go the same way as loading from url). To prevent issues, just keep it as "Embed as .kra". - removed "d->embed = false" in setFilename() and added ref->setEmbed(false) in the loading visitor instead, because then the responsibilities of parts of the code are more clear. M +0 -1 libs/ui/KisReferenceImage.cpp M +9 -0 libs/ui/KisView.cpp M +1 -0 plugins/impex/libkra/kis_kra_load_visitor.cpp https://invent.kde.org/graphics/krita/commit/485e586f6bdde3afff121d72f93def5327d51def (In reply to Tiar from comment #3) > Git commit 485e586f6bdde3afff121d72f93def5327d51def by Agata Cacko. > Committed on 28/02/2023 at 21:49. > Pushed by tymond into branch 'master'. > > Fix disabled Link to Image in Ref Tool after drag-and-drop > Great, I can also see now why multiple drag did work, this was done in a different block of code (see "// multiple URLs detected OR about to open a document") which was already setting the file URL. Will try it on next release! |