Commit b9e355c8 authored by Sanjiban Bairagya's avatar Sanjiban Bairagya
Browse files

Center on current position when application starts,

if no coordinates were saved from before
parent 830aee23
......@@ -909,7 +909,11 @@ namespace Marble
settings.beginGroup(QStringLiteral("MarbleQuickItem"));
double lon = settings.value(QStringLiteral("centerLon"), QVariant(0.0)).toDouble();
double lat = settings.value(QStringLiteral("centerLat"), QVariant(0.0)).toDouble();
centerOn(lon, lat);
if (lat == 0.0 && lon == 0.0) {
centerOnCurrentPosition();
} else {
centerOn(lon, lat);
}
int const zoom = settings.value(QStringLiteral("zoom"), QVariant(0)).toInt();
if (zoom > 0) {
setZoom(zoom);
......
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