Deleting key signature doesn't remove courtesy one at end of single-measure system (in Page View)
Starting with a 1-measure system where have a keysignature on next system, e.g.:
If then delete the real keysig, then the courtesy sig remains:
However expected behavior is that there should be no courtesy sig if there is no keysig.
Note: also happens if a Horintal Frame (aka HBox) is used to break up a system, for instance if start with:
Then after deleting the real keysig, the courtesy one remains:
Note that the courtesy sig will not disappear if add notes to first measure, but the courtesy sig will disappear when add an extra measure to that system, e.g.:
Looking at the code, I suspect the reason is because at the end of Score::layoutSystem(), the lines that remove generated elements :
if (firstMeasure && lastMeasure && firstMeasure != lastMeasure) removeGeneratedElements(firstMeasure, lastMeasure);
are not invoked when firstMeasure == lastMeasure (i.e. a single-measure system).