summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-05-07 10:57:37 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-05-07 11:01:15 +0200
commit7dbe768ffc91859ace1ea1947698be4db6be9701 (patch)
treeca1e0ec8f1e282e2dfc47773eeaeaa57c3212623 /linux
parentb7fa1d719677e7782d9a53f8fce92c09b15eba12 (diff)
downloadqtlocation-mapboxgl-7dbe768ffc91859ace1ea1947698be4db6be9701.tar.gz
change the window title to indicate the current style
Diffstat (limited to 'linux')
-rw-r--r--linux/main.cpp5
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);