From 62be6b2ed82d3e5aaa69d0e49fd2e34c71a762e4 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 4 Jun 2016 06:00:41 +1000 Subject: [PATCH] Fix framed curve thinko. - in FramedCurve, the first _point is used for the bounding box. Don't confuse this with actual data. --- libs/canvas/framed_curve.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libs/canvas/framed_curve.cc b/libs/canvas/framed_curve.cc index 4e7b4a8796..6cb2aa9d18 100644 --- a/libs/canvas/framed_curve.cc +++ b/libs/canvas/framed_curve.cc @@ -203,15 +203,12 @@ FramedCurve::render (Rect const & area, Cairo::RefPtr context) c /* a redraw may have been requested between the last sample and the last point.*/ + const Duple first_point = Duple (samples[left].x, samples[left].y); Duple last_point = Duple (samples[right].x, samples[right].y); - Duple first_point = Duple (samples[left].x, samples[left].y); if (draw.x1 > last_point.x) { last_point = Duple (_points.back().x, _points.back().y); } - if (draw.x0 < first_point.x) { - first_point = Duple (_points.front().x, _points.front().y); - } window_space = item_to_window (first_point); context->move_to (window_space.x, window_space.y);