From b92d077555ffafb37494b7e043d8df5c84ff3ebe Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 21 Jan 2018 14:52:35 +0100 Subject: [PATCH] LP-573 Workaround for duplicate Home/Safearea display --- .../gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp b/ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp index 6cbd9cec6..b6d7747cb 100644 --- a/ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp +++ b/ground/gcs/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp @@ -73,7 +73,12 @@ QRectF HomeItem::boundingRect() const if (pic.width() > localsafearea * 2 && !toggleRefresh) { return QRectF(-pic.width() / 2, -pic.height() / 2, pic.width(), pic.height()); } else { - return QRectF(-localsafearea, -localsafearea, localsafearea * 2, localsafearea * 2); + // FIXME: LP-573 For some reason when boundingRect is defined normally, + // return QRectF(-localsafearea, -localsafearea, localsafearea * 2, localsafearea * 2); + // the previous safearea circle and Home (both at previous/smaller size) still drawed + // into the corner of boudingRect area when zoom in. + // Current workaround is done expanding x100 the boundingRect returned. + return QRectF(-localsafearea * 100, -localsafearea * 100, localsafearea * 200, localsafearea * 200); } }