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

Fix attach dynamic to end of duration #27017

Merged
merged 2 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
12 changes: 12 additions & 0 deletions src/engraving/dom/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,10 @@ EngravingItem* Segment::firstInNextSegments(staff_idx_t activeStaff) const

EngravingItem* Segment::firstElementOfSegment(staff_idx_t activeStaff) const
{
if (isTimeTickType()) {
return nullptr;
}

for (auto i: m_elist) {
if (i && i->staffIdx() == activeStaff) {
if (i->isDurationElement()) {
Expand Down Expand Up @@ -1853,6 +1857,10 @@ EngravingItem* Segment::prevElementOfSegment(EngravingItem* e, staff_idx_t activ

EngravingItem* Segment::lastElementOfSegment(staff_idx_t activeStaff) const
{
if (isTimeTickType()) {
return nullptr;
}

const std::vector<EngravingItem*>& elements = m_elist;
for (auto it = elements.rbegin(); it != elements.rend(); ++it) {
EngravingItem* item = *it;
Expand Down Expand Up @@ -2173,6 +2181,10 @@ EngravingItem* Segment::prevElement(staff_idx_t activeStaff)
return lastEl;
}
}
if (isTimeTickType()) {
Segment* prevSeg = prev1MMenabled();
return prevSeg ? prevSeg->lastElementOfSegment(activeStaff) : nullptr;
}
track_idx_t track = score()->nstaves() * VOICES - 1;
Segment* s = this;
EngravingItem* el = s->element(track);
Expand Down
4 changes: 3 additions & 1 deletion src/engraving/dom/textbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3364,7 +3364,9 @@ bool TextBase::isNonTextualEditAllowed(EditData& ed) const
Key_Down
};

return muse::contains(ARROW_KEYS, static_cast<KeyboardKey>(ed.key)) && !(ed.modifiers & AltModifier);
bool altKeyWithoutShift = (ed.modifiers & AltModifier) && !(ed.modifiers & ShiftModifier);

return muse::contains(ARROW_KEYS, static_cast<KeyboardKey>(ed.key)) && !altKeyWithoutShift;
}

void TextBase::checkMeasureBoundariesAndMoveIfNeed()
Expand Down