Currently we have $D for creation date (actually taken from the coresponding mete tag) and $d for current date.
Additionally a "last modified date" would be useful, as kind of "poor man's revision cotrol"
drat, found 2 issues with that:
1. It doesn't work for (linked) parts, just the main score
2. changing anything in score (or part), so that is is marked 'dirty', doesn't get reflected
a) before being saved (here we might take current date/time instead?)
b) after having been saved, file needs to get closed and reopened to see the effect.
I think I found why this marco doesn't work for parts: the $F macro shows a non-existing path+filename (as long as the parts have not been saved seperatly) and the $M and $m macros use that too.
After a part has been saved seperatly, $F, $M and $m work, but of course don't reflect the path-name, date and time of the main score.
A fix for linked parts would be the same as proposed in [#34986]: use rootScore()'s informaton instead
A fix for 'dirty' scores/parts, would be to use current ttime and date.
The problem that these macros don't update once a score got saved seems to be much deeper in the inner guts of MuseScore, possible even a Qt Problem. Seems QFileInfo doesn't get upated?
Ah, found QFileInfo::refresh()
Using that in Score::saveFile() right before the 2 places it returns successfully does help, but only if switching to some other score or part, then back, so an update() seems needed too.
Comments
See PR #1339
Uses $m for last modified time and $M for last modified date
Fixed in 6705f2ea4a
drat, found 2 issues with that:
1. It doesn't work for (linked) parts, just the main score
2. changing anything in score (or part), so that is is marked 'dirty', doesn't get reflected
a) before being saved (here we might take current date/time instead?)
b) after having been saved, file needs to get closed and reopened to see the effect.
FWIW, a couple of other dialogs don't mark the score dirty - staff text properties, drumset editor, metatags
bad enough, but not the issue here, it doesn't work even if the score is marked dirty...
I think I found why this marco doesn't work for parts: the $F macro shows a non-existing path+filename (as long as the parts have not been saved seperatly) and the $M and $m macros use that too.
After a part has been saved seperatly, $F, $M and $m work, but of course don't reflect the path-name, date and time of the main score.
See also #34896: header/footer macros $F and $f show bogus information for linked parts
A fix for linked parts would be the same as proposed in [#34986]: use rootScore()'s informaton instead
A fix for 'dirty' scores/parts, would be to use current ttime and date.
PR to follow shortly
See PR #1344
The problem that these macros don't update once a score got saved seems to be much deeper in the inner guts of MuseScore, possible even a Qt Problem. Seems QFileInfo doesn't get upated?
Ah, found QFileInfo::refresh()
Using that in Score::saveFile() right before the 2 places it returns successfully does help, but only if switching to some other score or part, then back, so an update() seems needed too.
Fixed in 849c57b7b4
Automatically closed -- issue fixed for 2 weeks with no activity.