Skip to content

Commit

Permalink
fix translation for barlines, broken since 492709f
Browse files Browse the repository at this point in the history
and C++11 style for loop
  • Loading branch information
Jojo-Schmitz committed May 25, 2016
1 parent 4584c38 commit 5c053c0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mscore/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,26 +327,26 @@ Palette* MuseScore::newBarLinePalette(bool basic)
break;
BarLine* b = new BarLine(gscore);
b->setBarLineType(bti->type);
sp->append(b, qApp->translate("Palette", bti->name));
sp->append(b, BarLine::userTypeName(bti->type));
}

if (!basic) {
// bar line spans
struct {
int from, to;
const char* name;
} span[] = {
const char* userName;
} spans[] = {
{ BARLINE_SPAN_TICK1_FROM, BARLINE_SPAN_TICK1_TO, QT_TRANSLATE_NOOP("Palette", "Tick 1 span") },
{ BARLINE_SPAN_TICK2_FROM, BARLINE_SPAN_TICK2_TO, QT_TRANSLATE_NOOP("Palette", "Tick 2 span") },
{ BARLINE_SPAN_SHORT1_FROM,BARLINE_SPAN_SHORT1_TO,QT_TRANSLATE_NOOP("Palette", "Short 1 span") },
{ BARLINE_SPAN_SHORT2_FROM,BARLINE_SPAN_SHORT2_TO,QT_TRANSLATE_NOOP("Palette", "Short 2 span") },
};
for (unsigned i = 0; i < sizeof(span)/sizeof(*span); ++i) {
BarLine* b = new BarLine(gscore);
for (auto span : spans) {
BarLine* b = new BarLine(gscore);
b->setBarLineType(BarLineType::NORMAL);
b->setSpanFrom(span[i].from);
b->setSpanTo(span[i].to);
sp->append(b, qApp->translate("Palette", span[i].name));
b->setSpanFrom(span.from);
b->setSpanTo(span.to);
sp->append(b, qApp->translate("Palette", span.userName));
}
}
return sp;
Expand Down Expand Up @@ -397,7 +397,7 @@ Palette* MuseScore::newRepeatsPalette()

BarLine* b = new BarLine(gscore);
b->setBarLineType(bti->type);
PaletteCell* cell= sp->append(b, qApp->translate("Palette", bti->name));
PaletteCell* cell= sp->append(b, BarLine::userTypeName(bti->type));
cell->drawStaff = false;
}

Expand Down

0 comments on commit 5c053c0

Please sign in to comment.