Fix header/footer timestamps update on file save#33579
Conversation
624b26b to
c2299d8
Compare
89805e8 to
a57cdcc
Compare
… renderer as a dependency in NotationProject directly to decouple DOM and layout, and remove intermediate calls between renderer and ScorePageViewLayout
…ut and redraw of all excerpts if not necessary
16350cf to
870f4a3
Compare
|
@ajuncosa Tested and approved on Ubuntu 24.04.4 LTS. |
| if (page->score()->dirty() || !fileInfo->saved()) { | ||
| newFragments.back().text += muse::Time::currentTime().toString(muse::DateFormat::ISODate); | ||
| if (fileInfo->isNewlyCreated()) { | ||
| newFragments.back().text += String(u"HH:mm:ss"); |
There was a problem hiding this comment.
What's wrong with using the current time here?
There was a problem hiding this comment.
In these cases, the file has never been saved yet (so it technically does not exist) and we thought it would make more sense to display a placeholder to avoid confusion, since displaying the current time/date could lead to misinterpretation. If we ever support customising the time/date to something other than ISO, we could give this placeholder another think.
|
Any chance #15437: The date macros ($d, $D, $M) for header/footer show the dates in ISO format (YYYYY-MM-DD) rather than as per the current locale gets fixed too? |
Resolves: #33345
In order to be able to update the timestamps when saving the file, I have added and exposed some functions to layout the headers and footers only, to avoid doing a full re-layout when saving the file. Timestamps are now only updated on save instead of on modifications to the score.