mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix memleak of QGraphicsRectItem
We used to create a new QGraphicsRectItem everytime a Pixmap changed. Since I'm pretty sure I deleted every bit of the PictureItem before setting a new one, no leak was due, but this version is safer. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
947010991d
commit
c9499baf22
2 changed files with 18 additions and 17 deletions
|
|
@ -31,6 +31,8 @@ protected:
|
|||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
private:
|
||||
QString fileUrl;
|
||||
QGraphicsRectItem *canvas;
|
||||
QGraphicsRectItem *shadow;
|
||||
};
|
||||
|
||||
class DiveButtonItem : public DivePixmapItem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue