1
0
mirror of git://projects.qi-hardware.com/nanomap.git synced 2024-11-21 23:46:16 +02:00

show file name instead of generic Point of Interest title in layer menu

This commit is contained in:
Niels 2011-03-22 16:32:06 +01:00
parent f86e246ddb
commit 6bdf7c5f47

View File

@ -119,7 +119,7 @@ void MainWidget::loadFile(const QString &fileName, const QString &title)
} else if (fileName.endsWith(".osm")) { } else if (fileName.endsWith(".osm")) {
AbstractLayer *l = new PoiLayer(m_map); AbstractLayer *l = new PoiLayer(m_map);
l->load(fileName); l->load(fileName);
QString t = title.isEmpty() ? "Points Of Interest" : title; QString t = title.isEmpty() ? fileName.section("/", -1) : title;
m_map->addLayer(l, 3, t); m_map->addLayer(l, 3, t);
} }
showMap(); showMap();