comparison layer/SpectrogramLayer.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 e2b6a13a1f69
comparison
equal deleted inserted replaced
1430:31499c3520ee 1431:af824022bffd
1790 sv_frame_t right = left + resolution; 1790 sv_frame_t right = left + resolution;
1791 1791
1792 switch (snap) { 1792 switch (snap) {
1793 case SnapLeft: frame = left; break; 1793 case SnapLeft: frame = left; break;
1794 case SnapRight: frame = right; break; 1794 case SnapRight: frame = right; break;
1795 case SnapNearest:
1796 case SnapNeighbouring: 1795 case SnapNeighbouring:
1797 if (frame - left > right - frame) frame = right; 1796 if (frame - left > right - frame) frame = right;
1798 else frame = left; 1797 else frame = left;
1799 break; 1798 break;
1800 } 1799 }