comparison layer/Colour3DPlotLayer.cpp @ 1431:af824022bffd single-point

Begin fixing the various snap operations. Also remove SnapNearest, which is never used and seems to consume more lines of code than the rest!
author Chris Cannam
date Wed, 20 Mar 2019 14:59:34 +0000
parents 8e40faa56ffd
children 39f1154c0e97
comparison
equal deleted inserted replaced
1430:31499c3520ee 1431:af824022bffd
1187 sv_frame_t right = left + resolution; 1187 sv_frame_t right = left + resolution;
1188 1188
1189 switch (snap) { 1189 switch (snap) {
1190 case SnapLeft: frame = left; break; 1190 case SnapLeft: frame = left; break;
1191 case SnapRight: frame = right; break; 1191 case SnapRight: frame = right; break;
1192 case SnapNearest:
1193 case SnapNeighbouring: 1192 case SnapNeighbouring:
1194 if (frame - left > right - frame) frame = right; 1193 if (frame - left > right - frame) frame = right;
1195 else frame = left; 1194 else frame = left;
1196 break; 1195 break;
1197 } 1196 }