From e4e3f7d14327ae531da5bcb2c315c981cb67512c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 22 Apr 2017 10:19:02 +0200 Subject: [PATCH] Added missing atlas maps unloading on atlas unload --- src/atlas.cpp | 6 ++++++ src/atlas.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/atlas.cpp b/src/atlas.cpp index 80883171..2129829f 100644 --- a/src/atlas.cpp +++ b/src/atlas.cpp @@ -295,3 +295,9 @@ void Atlas::draw(QPainter *painter, const QRectF &rect, int mapIndex) map->draw(painter, pr); painter->translate(-offset); } + +void Atlas::unload() +{ + for (int i = 0; i < _maps.count(); i++) + _maps.at(i)->unload(); +} diff --git a/src/atlas.h b/src/atlas.h index 0383f877..871be6b0 100644 --- a/src/atlas.h +++ b/src/atlas.h @@ -29,6 +29,8 @@ public: void draw(QPainter *painter, const QRectF &rect); + void unload(); + bool isValid() const {return _valid;} const QString &errorString() const {return _errorString;}