From 99155f30aa129fdea0829cdd7b1b0d6b8bd95556 Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Tue, 16 Oct 2012 17:41:32 +0200 Subject: [PATCH] beamed grace notes have up stem on default --- libmscore/beam.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libmscore/beam.cpp b/libmscore/beam.cpp index d6b848b990c85..8829075cf6cc7 100644 --- a/libmscore/beam.cpp +++ b/libmscore/beam.cpp @@ -523,6 +523,18 @@ void Beam::layout1() } else { ChordRest* cr = _elements[0]; + NoteType noteType = NOTE_NORMAL; + if (cr->type() == CHORD) + noteType = static_cast(cr)->noteType(); + else { + for (int i = 1; i < _elements.size(); ++i) { + if (_elements[i]->type() == CHORD) { + noteType = static_cast(_elements[i])->noteType(); + break; + } + } + } + Measure* m = cr->measure(); if (m->hasVoices(cr->staffIdx())) { switch(cr->voice()) { @@ -532,6 +544,8 @@ void Beam::layout1() case 3: _up = (score()->style(ST_stemDir4).toDirection() == MScore::UP); break; } } + else if (noteType != NOTE_NORMAL) + _up = true; else if (!twoBeamedNotes()) { // highest or lowest note determines stem direction // down-stems is preferred if equal