Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions importexport/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4735,7 +4735,8 @@ static void directionMarker(XmlWriter& xml, const Marker* const m)
words = "Fine";
sound = "fine=\"yes\"";
}
else if (mtp == Marker::Type::TOCODA) {
else if (mtp == Marker::Type::TOCODA ||
mtp == Marker::Type::TOCODASYM) {
if (m->xmlText() == "")
words = "To Coda";
else
Expand Down Expand Up @@ -4810,8 +4811,9 @@ static void repeatAtMeasureStart(XmlWriter& xml, Attributes& attr, const Measure
attr.doAttr(xml, false);
directionMarker(xml, mk);
}
else if ( mtp == Marker::Type::FINE
|| mtp == Marker::Type::TOCODA
else if ( mtp == Marker::Type::FINE ||
mtp == Marker::Type::TOCODA ||
mtp == Marker::Type::TOCODASYM
) {
// ignore
}
Expand Down Expand Up @@ -4846,7 +4848,9 @@ static void repeatAtMeasureStop(XmlWriter& xml, const Measure* const m, int stra
// filter out the markers at measure stop
const Marker* const mk = toMarker(e);
Marker::Type mtp = mk->markerType();
if (mtp == Marker::Type::FINE || mtp == Marker::Type::TOCODA) {
if (mtp == Marker::Type::FINE ||
mtp == Marker::Type::TOCODA ||
mtp == Marker::Type::TOCODASYM) {
directionMarker(xml, mk);
}
else if (mtp == Marker::Type::SEGNO || mtp == Marker::Type::CODA) {
Expand Down
23 changes: 15 additions & 8 deletions libmscore/marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ static const ElementStyle markerStyle {

//must be in sync with Marker::Type enum
const MarkerTypeItem markerTypeTable[] = {
{ Marker::Type::SEGNO , QT_TRANSLATE_NOOP("markerType", "Segno") },
{ Marker::Type::VARSEGNO, QT_TRANSLATE_NOOP("markerType", "Segno variation")},
{ Marker::Type::CODA , QT_TRANSLATE_NOOP("markerType", "Coda") },
{ Marker::Type::VARCODA , QT_TRANSLATE_NOOP("markerType", "Varied coda") },
{ Marker::Type::CODETTA , QT_TRANSLATE_NOOP("markerType", "Codetta") },
{ Marker::Type::FINE , QT_TRANSLATE_NOOP("markerType", "Fine") },
{ Marker::Type::TOCODA , QT_TRANSLATE_NOOP("markerType", "To Coda") },
{ Marker::Type::USER , QT_TRANSLATE_NOOP("markerType", "Custom") }
{ Marker::Type::SEGNO , QT_TRANSLATE_NOOP("markerType", "Segno") },
{ Marker::Type::VARSEGNO , QT_TRANSLATE_NOOP("markerType", "Segno variation") },
{ Marker::Type::CODA , QT_TRANSLATE_NOOP("markerType", "Coda") },
{ Marker::Type::VARCODA , QT_TRANSLATE_NOOP("markerType", "Varied coda") },
{ Marker::Type::CODETTA , QT_TRANSLATE_NOOP("markerType", "Codetta") },
{ Marker::Type::FINE , QT_TRANSLATE_NOOP("markerType", "Fine") },
{ Marker::Type::TOCODA , QT_TRANSLATE_NOOP("markerType", "To Coda") },
{ Marker::Type::TOCODASYM, QT_TRANSLATE_NOOP("markerType", "To Coda (Symbol)")},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to distinguish the 2 Codas, esp. for visually impaired users (and to appease the tst_palette mtest)

{ Marker::Type::USER , QT_TRANSLATE_NOOP("markerType", "Custom") }
};

int markerTypeTableSize()
Expand Down Expand Up @@ -107,6 +108,12 @@ void Marker::setMarkerType(Type t)
setLabel("coda");
break;

case Type::TOCODASYM:
txt = "To <font size=\"20\"/><sym>coda</sym>";
Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we have to hard code the size of that symbol (here to the default size of the 'plain' Coda, 20 pt), it'd be way too small otherwise (12 pt per default).

initTid(Tid::REPEAT_RIGHT, true);
setLabel("coda");
break;

case Type::USER:
break;

Expand Down
3 changes: 2 additions & 1 deletion libmscore/marker.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ class Marker final : public TextBase {
VARSEGNO,
CODA,
VARCODA,
CODETTA,
CODETTA, // not in SMuFL, but still needed for 1.x compatibility, rendered as a double coda
FINE,
TOCODA,
TOCODASYM,
USER
};

Expand Down
2 changes: 1 addition & 1 deletion mscore/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ PalettePanel* MuseScore::newRepeatsPalettePanel()
sp->append(rm, qApp->translate("symUserNames", Sym::symUserNames[int(SymId::repeat1Bar)]));

for (int i = 0; i < markerTypeTableSize(); i++) {
if (markerTypeTable[i].type == Marker::Type::CODETTA) //not in smufl
if (markerTypeTable[i].type == Marker::Type::CODETTA) // not in SMuFL
continue;

Marker* mk = new Marker(gscore);
Expand Down
4 changes: 3 additions & 1 deletion mscore/timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,9 @@ void Timeline::jumpMarkerMeta(Segment* seg, int* stagger, int pos)
for (TextFragment tf : tf_list)
text.push_back(tf.text);
measure = marker->measure();
if (marker->markerType() == Marker::Type::FINE || marker->markerType() == Marker::Type::TOCODA) {
if (marker->markerType() == Marker::Type::FINE ||
marker->markerType() == Marker::Type::TOCODA ||
marker->markerType() == Marker::Type::TOCODASYM) {
elementType = ElementType::MARKER;
std::get<2>(_repeatInfo) = std::get<3>(_repeatInfo);
std::get<3>(_repeatInfo) = nullptr;
Expand Down
11 changes: 6 additions & 5 deletions mtest/mscore/palette/tst_palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ void TestPaletteModel::testDuplicateItemNames()
for (auto name = paletteItemNames.begin(); name != paletteItemNames.end(); ++name) {
if (name.value().size() != 1) {
// Exceptions - allowed duplicates
if (name.key().endsWith(" repeat sign") // repeat barlines in "Barlines" and "Repeats & Jumps" palette
|| name.key() == "Open" // articulations in "Articulations" and channel switch text in "Text" palette
|| name.key() == "Line" // bracket type in "Brackets" and line type in "Lines" palette
//|| name.key() == "Caesura" // 2 different Caesuras in the "Breaths & Pauses" palette (so far Master palette only)
|| name.key().startsWith("Add parentheses to ") // "Noteheads" and "Accidentals" palette
if (name.key().endsWith(" repeat sign") || // repeat barlines in "Barlines" and "Repeats & Jumps" palette
//name.key().startsWith("To Coda") || // 2 different "To Coda" in "Repeats & Jumps" palette (so far Master palette only)
name.key() == "Open" || // articulations in "Articulations" and channel switch text in "Text" palette
name.key() == "Line" || // bracket type in "Brackets" and line type in "Lines" palette
//name.key() == "Caesura" || // 2 different Caesuras in the "Breaths & Pauses" palette (so far Master palette only)
name.key().startsWith("Add parentheses to ") // "Noteheads" and "Accidentals" palette
)
continue;
duplicates = true;
Expand Down
14 changes: 0 additions & 14 deletions share/workspaces/Basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -704,27 +704,13 @@
<label>segno</label>
</Marker>
</Cell>
<Cell name="Segno variation">
<Marker>
<style>Repeat Text Left</style>
<text><sym>segnoSerpent1</sym></text>
<label>varsegno</label>
</Marker>
</Cell>
<Cell name="Coda">
<Marker>
<style>Repeat Text Left</style>
<text><sym>coda</sym></text>
<label>codab</label>
</Marker>
</Cell>
<Cell name="Varied coda">
<Marker>
<style>Repeat Text Left</style>
<text><sym>codaSquare</sym></text>
<label>varcoda</label>
</Marker>
</Cell>
<Cell name="Fine">
<Marker>
<style>Repeat Text Left</style>
Expand Down