musescore / musescore/MuseScore
Hidden 'stray' TAB clef in a piano score's treble clef staff
Open
@ajuncosa is already working on this.
Since Jul 31, 2026.
engraving
needs review
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Other type of issue
Description with steps to reproduce
-
Take the score from https://github.com/Jojo-Schmitz/MuseScore/issues/1104 (also linked to here)
-
Open in in MuseScore 4.6 or later (the score stems from 4.6.4)
-
Looks like this (all OK, apparently):
- Look at it's mscx file and notice at measure 5 on top staff:
<Clef>
<concertClefType>TAB</concertClefType>
<transposingClefType>TAB</transposingClefType>
<eid>Wnv6r3m51yJ_TYBJGc6/gJI</eid>
</Clef>
- Modify the source and rebuild
diff --git a/src/engraving/rendering/score/tlayout.cpp b/src/engraving/rendering/score/tlayout.cpp
index 6caf269145..ad4eb89c22 100644
--- a/src/engraving/rendering/score/tlayout.cpp
+++ b/src/engraving/rendering/score/tlayout.cpp
@@ -1680,7 +1680,7 @@ void TLayout::layoutClef(const Clef* item, Clef::LayoutData* ldata, const Layout
ldata->symId = SymId::noSym;
LOGD("invisible clef at tick %d(%d) staff %zu",
item->segment()->tick().ticks(), item->segment()->tick().ticks() / 1920, item->staffIdx());
- return;
+ //return;
}
lines = st->lines(); // init values from staff type
lineDist = st->lineDistance().val();
-
Open the score with that
-
See that stray TAB clef
Supporting files, videos and screenshots
No idea how that stray TAB clef got into that score, maybe @vanferry does?
In which versions of MuseScore Studio is this issue present?
Pretty much all versions
Regression
No.
Operating system
Windows 11 and other OSes
Additional context
Not sure whether this is a bug or something to fix at all, but I don't see anything wrong in showing that bogus stray TAB clef, so you can remove it.
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.