SUMMARY Documents created from relatively recently generated templates will not start with an editing time of 0, instead using (I assume) the editing time of the template file. STEPS TO REPRODUCE 1. Create a new document from the template "Animation-Japanese-En". 2. Observe total editing time in File -> Document Information. OBSERVED RESULT Total editing time is 26 minutes even though it should be a new document. EXPECTED RESULT Total editing time should be 0 seconds since it's a new document. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian sid KDE Plasma Version: 5.23.4 KDE Frameworks Version: 5.88.0 Qt Version: 5.12.11 (appimage) ADDITIONAL INFORMATION It does not seem to occur with older templates.
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 :)
MR opened: https://invent.kde.org/graphics/krita/-/merge_requests/1769