diff --git a/changes b/changes index ca0f402e3c99e99bb6f45a88697a460d12396371..24bddda5776a9f52d7ad474faf2c76cb65995316 100644 --- a/changes +++ b/changes @@ -1,4 +1,5 @@ 1.7.4 git + - handle notes beaming of each piano staves separately - plenty of tiny user interface improvements and fixes BUG FIXES - no more jumping UI when some of them was pressed diff --git a/src/libs/core/score/tscoreobject.cpp b/src/libs/core/score/tscoreobject.cpp index 6dd1439246a43f16e07b02bd14696be591d41867..e038fe76f39aab2602bba36a6e05678324a10e03 100644 --- a/src/libs/core/score/tscoreobject.cpp +++ b/src/libs/core/score/tscoreobject.cpp @@ -125,10 +125,11 @@ void TscoreObject::setClefType(Tclef::EclefType ct) { && ((newNote.chromatic() < 8 && newNote.onUpperStaff()) || !newNote.onUpperStaff())) { // find when to fix beaming due to note went to/from grand staff newNote.setOnUpperStaff(false); - fixBeam = true; + if (newNote.rhythm() > Trhythm::Quarter) + fixBeam = true; } else if (pianoChanged && m_clefType != Tclef::PianoStaffClefs) { // or merge beams when note from the same rhythmic group where on different staves - if (!newNote.onUpperStaff()) + if (!newNote.onUpperStaff() && newNote.rhythm() > Trhythm::Quarter) fixBeam = true; } @@ -461,8 +462,20 @@ void TscoreObject::noteClicked(qreal yPos) { if (m_workRhythm->isRest() || m_clefType == Tclef::NoClef) newNote.setNote(0); + // when note changed staff upper/lower but rhythm is the same + // we have to resolve beaming and fit staff here, setNote() will not preform that + bool fixBeam = isPianoStaff() && newNote.rhythm() > Trhythm::Quarter + && m_activeNote && m_activeNote->note()->onUpperStaff() != newNote.onUpperStaff() + && newNote.isValid() && m_activeNote->note()->rtm == newRhythm; bool selectLastNoteAgain = m_activeNote == lastNote() && m_activeNote->note()->rtm != newRhythm; + setNote(m_activeNote, newNote); + + if (fixBeam) { + m_activeNote->measure()->resolveBeaming(m_activeNote->wrapper()->rhythmGroup(), m_activeNote->wrapper()->rhythmGroup()); + m_activeNote->staff()->fit(); + } + if (selectLastNoteAgain) { // clicked note is the last one and changed its rhythm, so it was deleted and added again m_activeNote = lastNote(); setSelectedItem(lastNote());