Skip to content

Commit

Permalink
Fix GH#16833: BWW inport - clef and tempo
Browse files Browse the repository at this point in the history
Backport of musescore#21796
  • Loading branch information
sammik authored and Jojo-Schmitz committed Mar 4, 2024
1 parent f841018 commit 41d4a65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions importexport/bww/importbww.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ static void setTempo(Ms::Score* score, int tempo)
Ms::TempoText* tt = new Ms::TempoText(score);
tt->setTempo(double(tempo)/60.0);
tt->setTrack(0);
tt->setFollowText(true);
QString tempoText = Ms::TempoText::duration2tempoTextString(Ms::TDuration::DurationType::V_QUARTER);
tempoText += QString(" = %1").arg(tempo);
tt->setPlainText(tempoText);
tt->setXmlText(tempoText);
Ms::Measure* measure = score->firstMeasure();
Ms::Segment* segment = measure->getSegment(Ms::SegmentType::ChordRest, Ms::Fraction(0,1));
segment->add(tt);
Expand Down Expand Up @@ -247,7 +248,7 @@ void MsScWriter::beginMeasure(const Bww::MeasureBeginFlags mbf)
Ms::Clef* clef = new Ms::Clef(score);
clef->setClefType(Ms::ClefType::G);
clef->setTrack(0);
Ms::Segment* s = currentMeasure->getSegment(Ms::SegmentType::Clef, tick);
Ms::Segment* s = currentMeasure->getSegment(Ms::SegmentType::HeaderClef, tick);
s->add(clef);
// keysig
Ms::KeySigEvent key;
Expand Down

0 comments on commit 41d4a65

Please sign in to comment.