Mercurial > hg > svgui
comparison layer/FlexiNoteLayer.cpp @ 1547:e6362cf5ff1d
Pass a y-coord, optionally, to Layer::snapToFeatureFrame. This is necessary for BoxLayer which needs to coordinate its snaps with the box it is highlighting for editing. Then in BoxLayer, merge getPointToDrag and getLocalPoints into a single getLocalPoint and use this throughout.
author | Chris Cannam |
---|---|
date | Thu, 17 Oct 2019 11:12:54 +0100 |
parents | 4f8c72adbf43 |
children | 76e4302a3fc2 |
comparison
equal
deleted
inserted
replaced
1546:ec837d223bd9 | 1547:e6362cf5ff1d |
---|---|
584 } | 584 } |
585 | 585 |
586 bool | 586 bool |
587 FlexiNoteLayer::snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, | 587 FlexiNoteLayer::snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, |
588 int &resolution, | 588 int &resolution, |
589 SnapType snap) const | 589 SnapType snap, int ycoord) const |
590 { | 590 { |
591 auto model = ModelById::getAs<NoteModel>(m_model); | 591 auto model = ModelById::getAs<NoteModel>(m_model); |
592 if (!model) { | 592 if (!model) { |
593 return Layer::snapToFeatureFrame(v, frame, resolution, snap); | 593 return Layer::snapToFeatureFrame(v, frame, resolution, snap, ycoord); |
594 } | 594 } |
595 | 595 |
596 resolution = model->getResolution(); | 596 resolution = model->getResolution(); |
597 EventVector points; | 597 EventVector points; |
598 | 598 |