mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Dramatic performance gains by turning on caching for homeitem and mapgraphicitem.
This commit is contained in:
parent
e52d141e3e
commit
34efc4d3b7
@ -39,6 +39,7 @@ namespace mapcontrol
|
|||||||
this->setZValue(4);
|
this->setZValue(4);
|
||||||
coord=internals::PointLatLng(50,50);
|
coord=internals::PointLatLng(50,50);
|
||||||
RefreshToolTip();
|
RefreshToolTip();
|
||||||
|
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HomeItem::RefreshToolTip()
|
void HomeItem::RefreshToolTip()
|
||||||
|
@ -44,6 +44,8 @@ namespace mapcontrol
|
|||||||
connect(core,SIGNAL(OnNeedInvalidation()),this,SLOT(Core_OnNeedInvalidation()));
|
connect(core,SIGNAL(OnNeedInvalidation()),this,SLOT(Core_OnNeedInvalidation()));
|
||||||
connect(core,SIGNAL(OnMapDrag()),this,SLOT(ChildPosRefresh()));
|
connect(core,SIGNAL(OnMapDrag()),this,SLOT(ChildPosRefresh()));
|
||||||
connect(core,SIGNAL(OnMapZoomChanged()),this,SLOT(ChildPosRefresh()));
|
connect(core,SIGNAL(OnMapZoomChanged()),this,SLOT(ChildPosRefresh()));
|
||||||
|
setCacheMode(QGraphicsItem::ItemCoordinateCache);
|
||||||
|
|
||||||
//resize();
|
//resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ namespace mapcontrol
|
|||||||
mapfollowtype=UAVMapFollowType::None;
|
mapfollowtype=UAVMapFollowType::None;
|
||||||
trailtype=UAVTrailType::ByDistance;
|
trailtype=UAVTrailType::ByDistance;
|
||||||
timer.start();
|
timer.start();
|
||||||
// setCacheMode(QGraphicsItem::ItemCoordinateCache);
|
|
||||||
}
|
}
|
||||||
UAVItem::~UAVItem()
|
UAVItem::~UAVItem()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user