Remove unnecessary subtraction

This commit is contained in:
Vitaliy 2020-07-28 15:17:55 +03:00
parent f449ae598b
commit 74125e9925

View file

@ -152,7 +152,7 @@ public class TrackDetailsMenu {
float highestVisibleX = chart.getHighestVisibleX(); float highestVisibleX = chart.getHighestVisibleX();
float nextVisibleX = lowestVisibleX + (pos - gpxItem.chartHighlightPos); float nextVisibleX = lowestVisibleX + (pos - gpxItem.chartHighlightPos);
float oneFourthDiff = (highestVisibleX - lowestVisibleX) / 4f; float oneFourthDiff = (highestVisibleX - lowestVisibleX) / 4f;
if (pos - oneFourthDiff > 0) { if (pos > oneFourthDiff) {
nextVisibleX = pos - oneFourthDiff; nextVisibleX = pos - oneFourthDiff;
} }
gpxItem.chartHighlightPos = pos; gpxItem.chartHighlightPos = pos;