1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

Do not repeatedly compute the areas bounds

This commit is contained in:
2021-03-07 11:58:21 +01:00
parent 68f67425c3
commit cdc71e2856
8 changed files with 66 additions and 45 deletions

View File

@ -67,8 +67,8 @@ void AreaItem::updatePainterPath()
{
_painterPath = QPainterPath();
for (int i = 0; i < _area.size(); i++)
_painterPath.addPath(painterPath(_area.at(i)));
for (int i = 0; i < _area.polygons().size(); i++)
_painterPath.addPath(painterPath(_area.polygons().at(i)));
}
void AreaItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,