1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-573 Workaround for duplicate Home/Safearea display

This commit is contained in:
Laurent Lalanne 2018-01-21 14:52:35 +01:00
parent f5d36cca1b
commit b92d077555

View File

@ -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);
}
}