1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Dramatic performance gains by turning on caching for homeitem and mapgraphicitem.

This commit is contained in:
Laura Sebesta 2012-08-17 16:47:11 +02:00
parent e52d141e3e
commit 34efc4d3b7
3 changed files with 3 additions and 1 deletions

View File

@ -39,6 +39,7 @@ namespace mapcontrol
this->setZValue(4);
coord=internals::PointLatLng(50,50);
RefreshToolTip();
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
}
void HomeItem::RefreshToolTip()

View File

@ -44,6 +44,8 @@ namespace mapcontrol
connect(core,SIGNAL(OnNeedInvalidation()),this,SLOT(Core_OnNeedInvalidation()));
connect(core,SIGNAL(OnMapDrag()),this,SLOT(ChildPosRefresh()));
connect(core,SIGNAL(OnMapZoomChanged()),this,SLOT(ChildPosRefresh()));
setCacheMode(QGraphicsItem::ItemCoordinateCache);
//resize();
}

View File

@ -50,7 +50,6 @@ namespace mapcontrol
mapfollowtype=UAVMapFollowType::None;
trailtype=UAVTrailType::ByDistance;
timer.start();
// setCacheMode(QGraphicsItem::ItemCoordinateCache);
}
UAVItem::~UAVItem()
{