[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2010: If TorMapWidget::addRouter() is called for a router that is (in trunk: . src/gui/network)
Author: edmanm
Date: 2007-10-12 03:34:20 -0400 (Fri, 12 Oct 2007)
New Revision: 2010
Modified:
trunk/
trunk/src/gui/network/tormapwidget.cpp
Log:
r2084@lysithea: edmanm | 2007-10-12 03:34:15 -0400
If TorMapWidget::addRouter() is called for a router that is already on the
map, remove and free the existing instance before adding the router back with
the new location.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2084] on dc66be73-d13e-47ba-a267-8dc7cda68c65
Modified: trunk/src/gui/network/tormapwidget.cpp
===================================================================
--- trunk/src/gui/network/tormapwidget.cpp 2007-10-12 06:33:16 UTC (rev 2009)
+++ trunk/src/gui/network/tormapwidget.cpp 2007-10-12 07:34:20 UTC (rev 2010)
@@ -94,6 +94,8 @@
QPointF routerCoord = toMapSpace(latitude, longitude);
/* Add data the hash of known routers, and plot the point on the map */
+ if (_routers.contains(id))
+ delete _routers.take(id);
_routers.insert(id, new QPair<QPointF,bool>(routerCoord, false));
}