Skip to content

Commit

Permalink
Bring back changes lost in revert
Browse files Browse the repository at this point in the history
.github/workflows/ci_build.yml
35ff940

Verovio.xcodeproj/project.pbxproj
d4d4359

bc7bda5
src/iomusxml.cpp

src/page.cpp
e747a31

src/measure.cpp
src/view_element.cpp
a7d0721

src/calcdotsfunctor.cpp
src/preparedatafunctor.cpp
src/view_element.cpp
dc4b31e
  • Loading branch information
lpugin committed May 17, 2024
1 parent 1ea5a52 commit 3a67568
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
compiler: g++
version: "10"

- os: ubuntu-20.04
- os: ubuntu-22.04
compiler: g++
version: "11"

Expand Down
4 changes: 2 additions & 2 deletions Verovio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5172,7 +5172,7 @@
"$(inherited)",
NO_HUMDRUM_SUPPORT,
);
MACOSX_DEPLOYMENT_TARGET = "";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_NAME = "$(TARGET_NAME)";
USER_HEADER_SEARCH_PATHS = "";
};
Expand All @@ -5184,7 +5184,7 @@
CODE_SIGN_IDENTITY = "-";
DEAD_CODE_STRIPPING = YES;
GCC_PREPROCESSOR_DEFINITIONS = NO_HUMDRUM_SUPPORT;
MACOSX_DEPLOYMENT_TARGET = "";
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_NAME = "$(TARGET_NAME)";
USER_HEADER_SEARCH_PATHS = "";
};
Expand Down
4 changes: 0 additions & 4 deletions src/calcdotsfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ FunctorCode CalcDotsFunctor::VisitChord(Chord *chord)

FunctorCode CalcDotsFunctor::VisitNote(Note *note)
{
// We currently have no dots object with mensural notes
if (note->IsMensuralDur()) {
return FUNCTOR_SIBLINGS;
}
if (!note->IsVisible()) {
return FUNCTOR_SIBLINGS;
}
Expand Down
3 changes: 3 additions & 0 deletions src/iomusxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,9 @@ void MusicXmlInput::ReadMusicXmlAttributes(

section->AddChild(scoreDef);
}
else if (time && node.select_node("ancestor::part[(preceding-sibling::part)]")) {
m_meterUnit = time.child("beat-type").text().as_int();
}

pugi::xpath_node measureRepeat = node.select_node("measure-style/measure-repeat");
pugi::xpath_node measureSlash = node.select_node("measure-style/slash");
Expand Down
8 changes: 3 additions & 5 deletions src/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Measure::Measure(MeasureType measureMusic, int logMeasureNb)

this->Reset();

if (!measureMusic) this->SetRight(BARRENDITION_invis);
if (!this->IsMeasuredMusic()) this->SetRight(BARRENDITION_invis);
}

Measure::~Measure()
Expand Down Expand Up @@ -149,10 +149,8 @@ void Measure::Reset()
m_rightBarLine.SetForm(this->GetRight());
m_leftBarLine.SetForm(this->GetLeft());

if (!m_measureType) {
m_drawingFacsX1 = VRV_UNSET;
m_drawingFacsX2 = VRV_UNSET;
}
m_drawingFacsX1 = VRV_UNSET;
m_drawingFacsX2 = VRV_UNSET;

m_drawingEnding = NULL;
m_hasAlignmentRefWithMultipleLayers = false;
Expand Down
6 changes: 2 additions & 4 deletions src/page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,8 @@ void Page::ResetAligners()
CalcAlignmentPitchPosFunctor calcAlignmentPitchPos(doc);
this->Process(calcAlignmentPitchPos);

if (IsMensuralType(doc->m_notationType)) {
CalcLigatureNotePosFunctor calcLigatureNotePos(doc);
this->Process(calcLigatureNotePos);
}
CalcLigatureNotePosFunctor calcLigatureNotePos(doc);
this->Process(calcLigatureNotePos);

CalcStemFunctor calcStem(doc);
this->Process(calcStem);
Expand Down
22 changes: 11 additions & 11 deletions src/preparedatafunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,17 +1161,6 @@ FunctorCode PrepareLayerElementPartsFunctor::VisitNote(Note *note)
}
}

// We don't care about flags or dots in mensural notes
if (note->IsMensuralDur()) return FUNCTOR_CONTINUE;

if (currentStem) {
const bool shouldHaveFlag = ((note->GetActualDur() > DUR_4) && !note->IsInBeam() && !note->GetAncestorFTrem()
&& !note->IsChordTone() && !note->IsTabGrpNote());
currentFlag = this->ProcessFlag(currentFlag, currentStem, shouldHaveFlag);

if (!chord) note->SetDrawingStem(currentStem);
}

/************ dots ***********/

Dots *currentDots = vrv_cast<Dots *>(note->FindDescendantByType(DOTS, 1));
Expand All @@ -1182,6 +1171,17 @@ FunctorCode PrepareLayerElementPartsFunctor::VisitNote(Note *note)
}
currentDots = this->ProcessDots(currentDots, note, shouldHaveDots);

// We don't care about flags in mensural notes
if (note->IsMensuralDur()) return FUNCTOR_CONTINUE;

if (currentStem) {
const bool shouldHaveFlag = ((note->GetActualDur() > DUR_4) && !note->IsInBeam() && !note->GetAncestorFTrem()
&& !note->IsChordTone() && !note->IsTabGrpNote());
currentFlag = this->ProcessFlag(currentFlag, currentStem, shouldHaveFlag);

if (!chord) note->SetDrawingStem(currentStem);
}

/************ Prepare the drawing cue size ************/

PrepareCueSizeFunctor prepareCueSize;
Expand Down
5 changes: 4 additions & 1 deletion src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ void View::DrawNote(DeviceContext *dc, LayerElement *element, Layer *layer, Staf

if (note->IsMensuralDur()) {
this->DrawMensuralNote(dc, element, layer, staff, measure);
if (note->FindDescendantByType(DOTS)) {
this->DrawLayerChildren(dc, note, layer, staff, measure);
}
return;
}
if (note->IsTabGrpNote()) {
Expand Down Expand Up @@ -1733,7 +1736,7 @@ void View::DrawSyl(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
return;
}

if (m_doc->IsFacs()) {
if (!m_doc->IsFacs()) {
syl->SetDrawingYRel(this->GetSylYRel(syl->m_drawingVerse, staff));
}

Expand Down

0 comments on commit 3a67568

Please sign in to comment.