Skip to content

Commit

Permalink
Fix the humdrum importer and draw bracketSpan without func
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Oct 31, 2024
1 parent 90819f6 commit c570ee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/iohumdrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15755,7 +15755,7 @@ void HumdrumInput::handleLigature(hum::HTp token)
ligature->SetEndid("#" + endid);

ligature->SetLform(LINEFORM_solid);
ligature->SetFunc("ligature");
ligature->SetFunc(bracketSpanLog_FUNC_ligature);

addChildMeasureOrSection(ligature);
}
Expand Down Expand Up @@ -15838,7 +15838,7 @@ void HumdrumInput::handleColoration(hum::HTp token)
// data_LINEWIDTH lw;
// lw.SetLineWidthTerm(LINEWIDTHTERM_medium);
// coloration->SetLwidth(lw);
coloration->SetFunc("coloration");
coloration->SetFunc(bracketSpanLog_FUNC_coloration);

addChildMeasureOrSection(coloration);
}
Expand Down Expand Up @@ -21233,8 +21233,6 @@ void HumdrumInput::processPhrases(hum::HTp phraseend)
insertPhrase(bracket, phrasestart, phraseend, startmeasure, startchordsorted, endchordsorted,
phrasestartnoteinfo, phraseendnoteinfo, ndex, phraseindex, i, j, startpitches, endpitches,
indexused);
// bracket will not be drawn without the following line:
bracket->SetFunc("phrase");
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions src/view_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,6 @@ void View::DrawBracketSpan(
assert(bracketSpan->GetStart());
assert(bracketSpan->GetEnd());

if (!bracketSpan->HasFunc()) {
// we cannot draw a bracketSpan that has no func
return;
}

const int y = bracketSpan->GetDrawingY();

if (graphic) {
Expand Down

0 comments on commit c570ee5

Please sign in to comment.