Commit acd2d10b authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Fix average calculation for n > 1 :-P

parent 926082c9
......@@ -123,12 +123,11 @@ VectorTileLayer::VectorTileLayer(HttpDownloadManager *downloadManager,
d->m_averageScreenArea = 0;
foreach (QScreen *screen, QGuiApplication::screens()) {
qDebug() << screen->availableSize().width() << screen->availableSize().height();
d->m_averageScreenArea += screen->availableSize().width() * screen->availableSize().height();
}
if (d->m_averageScreenArea < 786432) {
d->m_averageScreenArea = 786432; // any screen size lower than 1024x768 is treated as 1024x768
}
d->m_averageScreenArea /= qMax(1, QGuiApplication::screens().size());
// any screen size lower than 1024x768 is treated as 1024x768
d->m_averageScreenArea = qMax(1024*768, d->m_averageScreenArea);
}
VectorTileLayer::~VectorTileLayer()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment