From 8ef185edbbf07435603009bc9b5bc56924cf02ca Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 27 Apr 2018 11:46:24 +0100 Subject: Fix crazy thinko in Rect::extend() causing subtitles to disappear when they were merged. From 565490c in master. --- src/lib/rect.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/rect.h b/src/lib/rect.h index d0daec437..4851ad007 100644 --- a/src/lib/rect.h +++ b/src/lib/rect.h @@ -91,10 +91,12 @@ public: void extend (Rect const & other) { + T old_x = x; + T old_y = y; x = std::min (x, other.x); y = std::min (y, other.y); - width = std::max (x + width, other.x + other.width) - x; - height = std::max (y + height, other.y + other.height) - y; + width = std::max (old_x + width, other.x + other.width) - x; + height = std::max (old_y + height, other.y + other.height) - y; } Rect extended (T amount) const { -- cgit v1.2.3