From 7d7569aa824d4f730e6715eff41a7b6d2b17842c Mon Sep 17 00:00:00 2001 From: Craig Stuart Sapp Date: Sun, 24 Sep 2023 16:38:56 -0700 Subject: [PATCH] Implementation for issue https://github.com/humdrum-tools/verovio-humdrum-viewer/issues/839 --- src/iohumdrum.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/iohumdrum.cpp b/src/iohumdrum.cpp index 22aba8af8ff..9633e944745 100644 --- a/src/iohumdrum.cpp +++ b/src/iohumdrum.cpp @@ -5604,13 +5604,16 @@ void HumdrumInput::fillStaffInfo(hum::HTp staffstart, int staffnumber, int staff if (part->compare(0, 5, "*clef") == 0) { if (cleftok) { if (clef == *part) { - // there is already a clef found, and it is the same + // There is already a clef found, and it is the same // as this one, so ignore the second one. } else { - // mark clef as a clef change to print in the layer - part->setValue("auto", "clefChange", 1); - markOtherClefsAsChange(part); + // Mark clef as a clef change to print in the layer: + if (part->isKern()) { + // Don't mark as clef change in **mens. + part->setValue("auto", "clefChange", 1); + markOtherClefsAsChange(part); + } } part = part->getNextToken(); continue; @@ -5621,7 +5624,7 @@ void HumdrumInput::fillStaffInfo(hum::HTp staffstart, int staffnumber, int staff cleftok = part; } else if (part->find("clefX") != std::string::npos) { - // allow percussion clef to not have a line number since it is unpitched. + // Allow percussion clef to not have a line number since it is unpitched. clef = *part; cleftok = part; } @@ -29392,7 +29395,6 @@ void HumdrumInput::markAdjacentNullsWithClef(hum::HTp clef) void HumdrumInput::markOtherClefsAsChange(hum::HTp clef) { - int ctrack = clef->getTrack(); int track;