[Marble-commits] KDE/kdeedu/marble/src/plugins/render/routing
Dennis Nienhüser
earthwings at gentoo.org
Mon Oct 25 19:59:39 CEST 2010
SVN commit 1189732 by nienhueser:
When enabling guidance mode and no position is known yet, point the camera to the start of the route.
M +12 -0 RoutingPlugin.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/routing/RoutingPlugin.cpp #1189731:1189732
@@ -21,6 +21,7 @@
#include "routing/AdjustNavigation.h"
#include "routing/RoutingManager.h"
#include "routing/RoutingModel.h"
+#include "routing/RouteRequest.h"
#include "MarbleDirs.h"
#include "MarbleWidget.h"
#include "MarbleModel.h"
@@ -283,6 +284,17 @@
this, SLOT( setCurrentLocation( GeoDataCoordinates, qreal ) ) );
}
+ if ( show && !tracking->positionProviderPlugin() ) {
+ RouteRequest* request = m_marbleWidget->model()->routingManager()->routeRequest();
+ if ( request && request->size() > 0 ) {
+ GeoDataCoordinates source = request->source();
+ GeoDataLookAt view;
+ view.setCoordinates( source );
+ view.setRange( 750 );
+ m_marbleWidget->flyTo( view );
+ }
+ }
+
m_marbleWidget->model()->routingManager()->setGuidanceModeEnabled( show );
updateWidget();
}
More information about the Marble-commits
mailing list