From c570ee5b998b87214fcd33b095e5d578e238a274 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 31 Oct 2024 22:36:56 +0100 Subject: [PATCH] Fix the humdrum importer and draw bracketSpan without func --- src/iohumdrum.cpp | 6 ++---- src/view_control.cpp | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/iohumdrum.cpp b/src/iohumdrum.cpp index 5feedb4b297..cc281827ce5 100644 --- a/src/iohumdrum.cpp +++ b/src/iohumdrum.cpp @@ -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); } @@ -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); } @@ -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"); } } } diff --git a/src/view_control.cpp b/src/view_control.cpp index 9d57236dc09..538acc581cf 100644 --- a/src/view_control.cpp +++ b/src/view_control.cpp @@ -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) {