[Marble-commits] KDE/kdeedu/marble/src/lib/routing

Dennis Nienhüser earthwings at gentoo.org
Thu Aug 26 09:17:38 CEST 2010


SVN commit 1168119 by nienhueser:

Fix the annoying delay when calculating very long routes: Add an upper limit of two seconds to wait for other routes after retrieving the first. Without any upper limit, the time to wait for the route to be displayed is too long when calculating complex routes. There's no way to distinguish a slow network from a slow route calculation, unfortunately.
CCMAIL: rahn at kde.org

 M  +1 -1      AlternativeRoutesModel.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/routing/AlternativeRoutesModel.cpp #1168118:1168119
@@ -331,7 +331,7 @@
         // First
         int responseTime = d->m_responseTime.elapsed();
         d->m_restrainedRoutes.push_back( document );
-        int timeout = qMax<int>(1000,  responseTime * 2);
+        int timeout = qMin<int>( 2000, qMax<int>( 500,  responseTime * 2 ) );
         QTimer::singleShot( timeout, this, SLOT( addRestrainedRoutes() ) );
         return;
     } else if ( d->m_routes.isEmpty() && !d->m_restrainedRoutes.isEmpty() ) {


More information about the Marble-commits mailing list