comparison layer/SpectrogramLayer.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 150d4e561b07
children 745be36202aa
comparison
equal deleted inserted replaced
1546:ec837d223bd9 1547:e6362cf5ff1d
1842 1842
1843 bool 1843 bool
1844 SpectrogramLayer::snapToFeatureFrame(LayerGeometryProvider *, 1844 SpectrogramLayer::snapToFeatureFrame(LayerGeometryProvider *,
1845 sv_frame_t &frame, 1845 sv_frame_t &frame,
1846 int &resolution, 1846 int &resolution,
1847 SnapType snap) const 1847 SnapType snap, int) const
1848 { 1848 {
1849 resolution = getWindowIncrement(); 1849 resolution = getWindowIncrement();
1850 sv_frame_t left = (frame / resolution) * resolution; 1850 sv_frame_t left = (frame / resolution) * resolution;
1851 sv_frame_t right = left + resolution; 1851 sv_frame_t right = left + resolution;
1852 1852