From e82a67d39b7754cde40b4dc04dd71b2a89dc6107 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Sat, 14 Mar 2015 18:03:49 +0100 Subject: [PATCH] Changing LayerElement::m_darwingStemDir to data_STEMDIRECTION --- include/vrv/layerelement.h | 6 ++++-- src/layerelement.cpp | 1 + src/view_beam.cpp | 2 +- src/view_element.cpp | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/vrv/layerelement.h b/include/vrv/layerelement.h index 125b1fa05bd..012d91f5471 100644 --- a/include/vrv/layerelement.h +++ b/include/vrv/layerelement.h @@ -133,8 +133,10 @@ class LayerElement: public DocObject /** If this is a note, store here the stem coordinates (useful for ex. tuplets) */ Point m_drawingStemStart; // beginning point, the one near the note Point m_drawingStemEnd; // end point (!), near beam or stem - /** stem direction as drawn, true = up, false = down */ - bool m_drawingStemDir; + /** + * Stem direction as drawn + */ + data_STEMDIRECTION m_drawingStemDir; /** * This store a pointer to the corresponding BeamElementCoord(currentDur > DUR_4) */ diff --git a/src/layerelement.cpp b/src/layerelement.cpp index f4acbaa2e77..47b106d6d63 100644 --- a/src/layerelement.cpp +++ b/src/layerelement.cpp @@ -65,6 +65,7 @@ void LayerElement::Reset() m_isScoreOrStaffDefAttr = false; m_alignment = NULL; + m_drawingStemDir = STEMDIRECTION_NONE; m_beamElementCoord = NULL; } diff --git a/src/view_beam.cpp b/src/view_beam.cpp index 2905345cffe..3ad2db715bf 100644 --- a/src/view_beam.cpp +++ b/src/view_beam.cpp @@ -367,7 +367,7 @@ void View::DrawBeamPostponed( DeviceContext *dc, Layer *layer, Beam *beam, Staff (*beamElementCoords)[i]->m_element->m_drawingStemStart.x = (*beamElementCoords)[i]->m_element->m_drawingStemEnd.x = (*beamElementCoords)[i]->m_x; (*beamElementCoords)[i]->m_element->m_drawingStemStart.y = fy2; (*beamElementCoords)[i]->m_element->m_drawingStemEnd.y = fy1; - (*beamElementCoords)[i]->m_element->m_drawingStemDir = false; + (*beamElementCoords)[i]->m_element->m_drawingStemDir = stemDir; if((*beamElementCoords)[i]->m_element->IsNote() || (*beamElementCoords)[i]->m_element->IsChord()) DrawVerticalLine (dc,fy2, fy1, (*beamElementCoords)[i]->m_x, m_doc->m_style->m_stemWidth); diff --git a/src/view_element.cpp b/src/view_element.cpp index 309dd59a697..1814032fc66 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -509,7 +509,7 @@ void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2); object->m_drawingStemStart.y = y1; object->m_drawingStemEnd.y = y2; - object->m_drawingStemDir = true; + object->m_drawingStemDir = STEMDIRECTION_up; if (drawingDur > DUR_4) { DrawSmuflCode( dc, x2 - m_doc->m_style->m_stemWidth, y2, SMUFL_E240_flag8thUp, staff->staffSize, object->m_cueSize ); @@ -523,7 +523,7 @@ void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2); object->m_drawingStemStart.y = y1; object->m_drawingStemEnd.y = y2; - object->m_drawingStemDir = false; + object->m_drawingStemDir = STEMDIRECTION_down; if (drawingDur > DUR_4) { DrawSmuflCode( dc, x2 , y2, SMUFL_E241_flag8thDown , staff->staffSize, object->m_cueSize );