Summary: | Documents created from templates unexpectedly reuse template's metadata such as total editing time, created/modified date, revision number | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | tomtomtomreportingin |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | code, halla |
Priority: | NOR | ||
Version: | 5.0.0-beta5 | ||
Target Milestone: | --- | ||
Platform: | Appimage | ||
OS: | Linux | ||
See Also: | https://invent.kde.org/graphics/krita/-/merge_requests/1769 | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/26c48dc4af5c80ac6930ea8a0bc0dd2ea1c6cc6b | Version Fixed In: |
Description
tomtomtomreportingin
2021-12-15 02:34:37 UTC
Additionally, documents created from templates also reuse other metadata such as created/modified date and revision number. I've changed the title of the bug report to account for this. This bug also effects the new recording features when the user creates a new image from a template. Snapshots are recorded to a folder based off the document creation date. (In reply to zera@zeragamba.ca from comment #2) > This bug also effects the new recording features when the user creates a new > image from a template. Snapshots are recorded to a folder based off the > document creation date. Workaround for this is to start a new document from template, clear the document metadata, save it, close, then reopen Still an issue in 5.1.0 :( Any chance this can be looked at, or at least some pointers as to where to look to see if I can patch it myself? My idea on patching this issue was the following: - On open file - if was opened as template, - reset created and modified dates to current timestamp - reset revision number to 0 - reset editing time to 0 - ensure recording folder is updated to new timestamp I'm sorry, but we have so many open bugs that it's to promise anything. The template code is also pretty old and gnarly. Probably the best starting point to look into the issue would be void KisPart::openTemplate(const QUrl &url) -- that already resets a couple of things on the document, and it might be possible to fix the issue in the if (ok) { block. Oh hey, that's exactly what i needed. Looks like it's a one line addition in KisPart::openTemplate: document->documentInfo()->resetMetaData(); I'll have a look into how to submit this fix :) |