summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2015-08-28 21:52:27 +0200
committerDennis Nienhüser <[email protected]>2015-08-28 21:52:27 +0200
commit95d4c0cbdc5222ed648be089de474cb3c6c1133e (patch)
tree29ebe6ee2d564e8505430e9a6bf6c358f12e87de
parenta91c079c0bfb057dc48e25e8e9b49f7fe43f4c36 (diff)
Keep placemark information
-rw-r--r--src/lib/marble/declarative/Placemark.cpp5
-rw-r--r--src/lib/marble/declarative/Placemark.h2
-rw-r--r--src/lib/marble/declarative/Routing.cpp5
3 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/marble/declarative/Placemark.cpp b/src/lib/marble/declarative/Placemark.cpp
index a91e01f..a435f16 100644
--- a/src/lib/marble/declarative/Placemark.cpp
+++ b/src/lib/marble/declarative/Placemark.cpp
@@ -25,6 +25,11 @@ void Placemark::setGeoDataPlacemark( const Marble::GeoDataPlacemark &placemark )
emit addressChanged();
}
+Marble::GeoDataPlacemark Placemark::placemark() const
+{
+ return m_placemark;
+}
+
Coordinate *Placemark::coordinate()
{
return &m_coordinate;
diff --git a/src/lib/marble/declarative/Placemark.h b/src/lib/marble/declarative/Placemark.h
index f2732f9..e8214dc 100644
--- a/src/lib/marble/declarative/Placemark.h
+++ b/src/lib/marble/declarative/Placemark.h
@@ -36,6 +36,8 @@ public:
void setGeoDataPlacemark( const Marble::GeoDataPlacemark &placemark );
+ Marble::GeoDataPlacemark placemark() const;
+
Coordinate* coordinate();
QString name() const;
diff --git a/src/lib/marble/declarative/Routing.cpp b/src/lib/marble/declarative/Routing.cpp
index 836fd3d..520222e 100644
--- a/src/lib/marble/declarative/Routing.cpp
+++ b/src/lib/marble/declarative/Routing.cpp
@@ -185,8 +185,7 @@ int Routing::addSearchResultPlacemark(Placemark *placemark)
}
}
Placemark * newPlacemark = new Placemark(this);
- newPlacemark->coordinate()->setCoordinates(placemark->coordinate()->coordinates());
- newPlacemark->setName(placemark->name());
+ newPlacemark->setGeoDataPlacemark(placemark->placemark());
d->m_searchResultPlacemarks.push_back(newPlacemark);
}
@@ -445,7 +444,7 @@ void Routing::addViaByPlacemarkAtIndex(int index, Placemark *placemark)
{
if ( d->m_marbleMap ) {
Marble::RouteRequest * request = d->m_marbleMap->model()->routingManager()->routeRequest();
- request->insert(index, placemark->coordinate()->coordinates(), placemark->name());
+ request->insert(index, placemark->placemark());
updateRoute();
}
}