From 0527fabb4fbd02f719b32df8881229eb224af981 Mon Sep 17 00:00:00 2001 From: rachytski Date: Sun, 16 Jan 2011 19:06:17 +0200 Subject: [PATCH] bug in getUpdateAreas for two non-intersecting screens. --- map/render_queue_routine.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/map/render_queue_routine.cpp b/map/render_queue_routine.cpp index cff8c59658..16fb1ed39f 100644 --- a/map/render_queue_routine.cpp +++ b/map/render_queue_routine.cpp @@ -148,14 +148,19 @@ void RenderQueueRoutine::getUpdateAreas(vector & areas) maxY = minY + my::Abs(dy); - if (minX != maxX) - areas.push_back(m2::RectI(minX, 0, maxX, h)); - if (minY != maxY) + if ((my::Abs(dx) > w) || (my::Abs(dy) > h)) + areas.push_back(m2::RectI(0, 0, w, h)); + else { - if (minX == 0) - areas.push_back(m2::RectI(maxX, minY, w, maxY)); - else - areas.push_back(m2::RectI(0, minY, minX, maxY)); + if (minX != maxX) + areas.push_back(m2::RectI(minX, 0, maxX, h)); + if (minY != maxY) + { + if (minX == 0) + areas.push_back(m2::RectI(maxX, minY, w, maxY)); + else + areas.push_back(m2::RectI(0, minY, minX, maxY)); + } } } else