Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5.0 ports #27019

Merged
merged 9 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/engraving/dom/transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ void Score::transpositionChanged(Part* part, Interval oldV, Fraction tickStart,
}

// now transpose notes and chord symbols
for (Segment* s = firstSegment(SegmentType::ChordRest); s; s = s->next1(SegmentType::ChordRest)) {
for (Segment* s = firstSegment(Segment::CHORD_REST_OR_TIME_TICK_TYPE); s; s = s->next1(Segment::CHORD_REST_OR_TIME_TICK_TYPE)) {
if (s->tick() < tickStart) {
continue;
}
Expand Down
6 changes: 2 additions & 4 deletions src/engraving/rendering/score/chordlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,10 +1275,8 @@ bool ChordLayout::isChordPosBelowBeam(Chord* item, Beam* beam)
Note* baseNote = item->up() ? item->downNote() : item->upNote();
double noteY = baseNote->pagePos().y();

ChordRest* startCR = beam->elements().front();
ChordRest* endCR = beam->elements().back();
PointF startAnchor = BeamLayout::chordBeamAnchor(beam, startCR, ChordBeamAnchorType::Start);
PointF endAnchor = BeamLayout::chordBeamAnchor(beam, endCR, ChordBeamAnchorType::End);
PointF startAnchor = beam->startAnchor();
PointF endAnchor = beam->endAnchor();

if (item == beam->elements().front()) {
return noteY > startAnchor.y();
Expand Down
6 changes: 5 additions & 1 deletion src/engraving/rendering/score/measurelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ void MeasureLayout::setCourtesyClef(Measure* m, const Fraction& refClefTick, con
}
}

void MeasureLayout::placeParentheses(const Segment* segment, track_idx_t trackIdx, LayoutContext& ctx)
void MeasureLayout::placeParentheses(Segment* segment, track_idx_t trackIdx, LayoutContext& ctx)
{
const EngravingItem* segItem = segment->elementAt(trackIdx);
const std::vector<EngravingItem*> parens = segment->findAnnotations(ElementType::PARENTHESIS, trackIdx, trackIdx);
Expand Down Expand Up @@ -2014,6 +2014,7 @@ void MeasureLayout::placeParentheses(const Segment* segment, track_idx_t trackId
paren->pos()), dummySegShape, paren->spatium());
paren->mutldata()->moveX(-minDist);
}
segment->createShape(track2staff(trackIdx));
return;
}

Expand Down Expand Up @@ -2053,6 +2054,7 @@ void MeasureLayout::placeParentheses(const Segment* segment, track_idx_t trackId
const double parenPadding = segment->score()->paddingTable().at(ElementType::PARENTHESIS).at(ElementType::PARENTHESIS);

if (itemWidth >= parenPadding) {
segment->createShape(track2staff(trackIdx));
return;
}

Expand All @@ -2067,6 +2069,8 @@ void MeasureLayout::placeParentheses(const Segment* segment, track_idx_t trackId

leftParen->mutldata()->moveX(-(parenToItemDist - leftParenToItem));
rightParen->mutldata()->moveX(-(itemToRightParen - parenToItemDist));

segment->createShape(track2staff(trackIdx));
}

Parenthesis* MeasureLayout::findOrCreateParenthesis(Segment* segment, const DirectionH direction, const track_idx_t track)
Expand Down
2 changes: 1 addition & 1 deletion src/engraving/rendering/score/measurelayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MeasureLayout
static void removeRepeatCourtesyParenthesesSegment(Segment* seg, const track_idx_t track,
const DirectionH direction = DirectionH::AUTO);
static void addRepeatCourtesyParentheses(Measure* m, const bool continuation, LayoutContext& ctx);
static void placeParentheses(const Segment* segment, track_idx_t trackIdx, LayoutContext& ctx);
static void placeParentheses(Segment* segment, track_idx_t trackIdx, LayoutContext& ctx);
static void addRepeatCourtesies(Measure* m, LayoutContext& ctx);
static void removeRepeatCourtesies(Measure* m);
static void addRepeatContinuationCourtesies(Measure* m, LayoutContext& ctx);
Expand Down
11 changes: 4 additions & 7 deletions src/engraving/rendering/score/systemlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,19 +450,16 @@ void SystemLayout::layoutSystemLockIndicators(System* system, LayoutContext& ctx
const std::vector<SystemLockIndicator*> lockIndicators = system->lockIndicators();
// In PAGE view, at most ONE lock indicator can exist per system.
assert(lockIndicators.size() <= 1);
system->deleteLockIndicators();

const SystemLock* lock = system->systemLock();
if (!lock) {
system->deleteLockIndicators();
return;
}

SystemLockIndicator* lockIndicator = lockIndicators.empty() ? nullptr : lockIndicators.front();
if (!lockIndicator) {
lockIndicator = new SystemLockIndicator(system, lock);
lockIndicator->setParent(system);
system->addLockIndicator(lockIndicator);
}
SystemLockIndicator* lockIndicator = new SystemLockIndicator(system, lock);
lockIndicator->setParent(system);
system->addLockIndicator(lockIndicator);

TLayout::layoutSystemLockIndicator(lockIndicator, lockIndicator->mutldata());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="UTF-8"?>
<museScore version="4.50">
<programVersion>4.6.0</programVersion>
<programRevision></programRevision>
<Score>
<eid>2kOmbTnFT2K_1Ffu11EvJBD</eid>
<Division>480</Division>
<showInvisible>1</showInvisible>
<showUnprintable>1</showUnprintable>
<showFrames>1</showFrames>
<showMargins>0</showMargins>
<open>1</open>
<metaTag name="arranger"></metaTag>
<metaTag name="composer">Composer / arranger</metaTag>
<metaTag name="copyright"></metaTag>
<metaTag name="creationDate">2025-03-10</metaTag>
<metaTag name="lyricist"></metaTag>
<metaTag name="movementNumber"></metaTag>
<metaTag name="movementTitle"></metaTag>
<metaTag name="platform">Apple Macintosh</metaTag>
<metaTag name="source"></metaTag>
<metaTag name="subtitle">Subtitle</metaTag>
<metaTag name="translator"></metaTag>
<metaTag name="workNumber"></metaTag>
<metaTag name="workTitle">Untitled score</metaTag>
<Order id="orchestra">
<name>Orchestra</name>
<instrument id="flute">
<family id="flutes">Flutes</family>
</instrument>
<section id="woodwind" brackets="true" barLineSpan="true" thinBrackets="true">
<family>flutes</family>
<family>oboes</family>
<family>clarinets</family>
<family>saxophones</family>
<family>bassoons</family>
<unsorted group="woodwinds"/>
</section>
<section id="brass" brackets="true" barLineSpan="true" thinBrackets="true">
<family>horns</family>
<family>trumpets</family>
<family>cornets</family>
<family>flugelhorns</family>
<family>trombones</family>
<family>tubas</family>
<unsorted group="brass"/>
</section>
<section id="timpani" brackets="true" barLineSpan="true" thinBrackets="true">
<family>timpani</family>
</section>
<section id="percussion" brackets="true" barLineSpan="true" thinBrackets="true">
<family>keyboard-percussion</family>
<unsorted group="pitched-percussion"/>
<family>drums</family>
<family>unpitched-metal-percussion</family>
<family>unpitched-wooden-percussion</family>
<family>other-percussion</family>
<unsorted group="unpitched-percussion"/>
</section>
<family>keyboards</family>
<family>harps</family>
<family>organs</family>
<family>synths</family>
<unsorted/>
<soloists/>
<section id="voices" brackets="true" barLineSpan="false" thinBrackets="true">
<family>voices</family>
<family>voice-groups</family>
</section>
<section id="strings" brackets="true" barLineSpan="true" thinBrackets="true">
<family>orchestral-strings</family>
</section>
</Order>
<Part id="1">
<Staff id="1">
<StaffType group="pitched">
<name>stdNormal</name>
</StaffType>
</Staff>
<trackName>Flute</trackName>
<Instrument id="flute">
<longName>Flute</longName>
<shortName>Fl.</shortName>
<trackName>Flute</trackName>
<minPitchP>59</minPitchP>
<maxPitchP>98</maxPitchP>
<minPitchA>60</minPitchA>
<maxPitchA>93</maxPitchA>
<instrumentId>wind.flutes.flute</instrumentId>
<Channel>
<program value="73"/>
<synti>Fluid</synti>
</Channel>
<Channel name="harmony">
<program value="0"/>
<synti>Fluid</synti>
</Channel>
</Instrument>
</Part>
<Staff id="1">
<Measure>
<eid>IbIByf9V45G_n1FatmQDVWL</eid>
<voice>
<KeySig>
<eid>EXMLx/3R3qJ_c7cWKj13N+H</eid>
<concertKey>0</concertKey>
</KeySig>
<TimeSig>
<eid>J0Rmy10EtIN_1Pc/Cz+r81</eid>
<sigN>4</sigN>
<sigD>4</sigD>
</TimeSig>
<Harmony>
<root>14</root>
<eid>i6JddkooT+K_VCqDglUeMRM</eid>
</Harmony>
<Chord>
<eid>HzvSPszx2NI_lxchTRPN6iO</eid>
<durationType>half</durationType>
<Note>
<eid>9v0GXubQFuD_28VjANAW6QP</eid>
<pitch>67</pitch>
<tpc>15</tpc>
</Note>
</Chord>
<location>
<fractions>-1/4</fractions>
<timeTick>1</timeTick>
</location>
<Harmony>
<root>16</root>
<eid>SYmKSDioSgJ_3nRLTs3666</eid>
</Harmony>
<location>
<fractions>1/4</fractions>
</location>
<Harmony>
<root>18</root>
<eid>mPZO1MniRBK_DR0+zmVAE6N</eid>
</Harmony>
<Chord>
<eid>lNT7H0p9/lF_SLiwqKlD1UD</eid>
<durationType>half</durationType>
<Note>
<eid>9i1YoWhQ61M_QDmwLNAB6eJ</eid>
<pitch>67</pitch>
<tpc>15</tpc>
</Note>
</Chord>
<location>
<fractions>-1/4</fractions>
<timeTick>1</timeTick>
</location>
<Harmony>
<root>13</root>
<eid>saAjlrm1EO_FhNXvmfkddI</eid>
</Harmony>
</voice>
</Measure>
<Measure>
<eid>ZuKAVzo7TK_s158BJvRsNN</eid>
<voice>
<Harmony>
<root>14</root>
<eid>dvEMaLQcibK_SEWH/F36llB</eid>
</Harmony>
<Chord>
<eid>/Sa4VlGGHaH_eEnHBeShepD</eid>
<durationType>half</durationType>
<Note>
<eid>3Hmm8a/YfmO_gfnHMV576XE</eid>
<pitch>67</pitch>
<tpc>15</tpc>
</Note>
</Chord>
<location>
<fractions>-1/4</fractions>
<timeTick>1</timeTick>
</location>
<Harmony>
<root>16</root>
<eid>Ok0ECFxRvuI_2P4foxuqZq</eid>
</Harmony>
<location>
<fractions>1/4</fractions>
</location>
<Harmony>
<root>10</root>
<eid>wLPL51aE/ZK_WYJ1s3hVxsG</eid>
</Harmony>
<Chord>
<eid>weLPdp/TOPE_HveOwApPWWC</eid>
<durationType>half</durationType>
<Note>
<eid>fHTzGDb6kWP_AT+2b8DnxsG</eid>
<pitch>67</pitch>
<tpc>15</tpc>
</Note>
</Chord>
<location>
<fractions>-1/4</fractions>
<timeTick>1</timeTick>
</location>
<Harmony>
<root>20</root>
<eid>DUSTglH1glB_HnfKXBpuT4K</eid>
</Harmony>
</voice>
</Measure>
</Staff>
</Score>
</museScore>
Loading