diff layer/Colour3DPlotLayer.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 0e971e3d93e2
children 563bab925c9b
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Thu Oct 17 10:26:21 2019 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Thu Oct 17 11:12:54 2019 +0100
@@ -1215,13 +1215,15 @@
 }
 
 bool
-Colour3DPlotLayer::snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
+Colour3DPlotLayer::snapToFeatureFrame(LayerGeometryProvider *v,
+                                      sv_frame_t &frame,
                                       int &resolution,
-                                      SnapType snap) const
+                                      SnapType snap,
+                                      int ycoord) const
 {
     auto model = ModelById::getAs<DenseThreeDimensionalModel>(m_model);
     if (!model) {
-        return Layer::snapToFeatureFrame(v, frame, resolution, snap);
+        return Layer::snapToFeatureFrame(v, frame, resolution, snap, ycoord);
     }
 
     resolution = model->getResolution();