diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-05-07 10:57:37 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-05-07 11:01:15 +0200 |
commit | 7dbe768ffc91859ace1ea1947698be4db6be9701 (patch) | |
tree | ca1e0ec8f1e282e2dfc47773eeaeaa57c3212623 /linux | |
parent | b7fa1d719677e7782d9a53f8fce92c09b15eba12 (diff) | |
download | qtlocation-mapboxgl-7dbe768ffc91859ace1ea1947698be4db6be9701.tar.gz |
change the window title to indicate the current style
Diffstat (limited to 'linux')
-rw-r--r-- | linux/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/main.cpp b/linux/main.cpp index c295eb18e0..d279e9d8fe 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -87,6 +87,7 @@ int main(int argc, char *argv[]) { const auto& newStyle = mbgl::util::defaultStyles[currentStyleIndex]; map.setStyleURL(newStyle.first); + view->setWindowTitle(newStyle.second); mbgl::Log::Info(mbgl::Event::Setup, std::string("Changed style to: ") + newStyle.first); }); @@ -101,7 +102,9 @@ int main(int argc, char *argv[]) { // Load style if (style.empty()) { - style = mbgl::util::defaultStyles.front().first; + const auto& newStyle = mbgl::util::defaultStyles.front(); + style = newStyle.first; + view->setWindowTitle(newStyle.second); } map.setStyleURL(style); |