[Marble-commits] KDE/kdeedu/marble/src/lib/routing
Dennis Nienhüser
earthwings at gentoo.org
Sat Nov 13 23:26:32 CET 2010
SVN commit 1196685 by nienhueser:
Once the selected routing profile is changed by the user, immediately set it on the route request. Fixes profile changes not applied when modifying a route via drag and drop.
CCBUG: 253860
M +9 -0 RoutingWidget.cpp
M +3 -0 RoutingWidget.h
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingWidget.cpp #1196684:1196685
@@ -218,6 +218,8 @@
this, SLOT( updateProgress() ) );
connect( d->m_ui.routeComboBox, SIGNAL( currentIndexChanged( int ) ),
this, SLOT( switchRoute( int ) ) );
+ connect( d->m_ui.routingProfileComboBox, SIGNAL( currentIndexChanged( int ) ),
+ this, SLOT( setRoutingProfile( int ) ) );
connect( d->m_routingManager->alternativeRoutesModel(), SIGNAL( rowsInserted( QModelIndex, int, int ) ),
this, SLOT( updateAlternativeRoutes() ) );
@@ -576,6 +578,13 @@
}
}
+void RoutingWidget::setRoutingProfile( int index )
+{
+ if ( index >= 0 && index < d->m_routingManager->profilesModel()->rowCount() ) {
+ d->m_routeRequest->setRoutingProfile( d->m_routingManager->profilesModel()->profiles().at( index ) );
+ }
+}
+
} // namespace Marble
#include "RoutingWidget.moc"
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingWidget.h #1196684:1196685
@@ -116,6 +116,9 @@
/** Ask the user for a kml file to open */
void openRouteFile();
+ /** Update the route request with the given profile */
+ void setRoutingProfile( int index );
+
private:
RoutingWidgetPrivate *const d;
};
More information about the Marble-commits
mailing list