aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/diveeventitem.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-03-04 01:01:52 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commit630862971fc314439dfa6d274474eb18e8f96711 (patch)
tree67eb3d7cbed81b4152a017a39f81d260f9cb02a9 /profile-widget/diveeventitem.cpp
parente811c7306d210af17a6571e61f23496ce91fa4bc (diff)
downloadsubsurface-630862971fc314439dfa6d274474eb18e8f96711.tar.gz
Dive pictures: remove close-button optimization
One close-button object was used for all dive pictures. This seems like a brittle premature optimization and the pixmap is shared anyway. Make the button a subobject of the dive picture object. Change the object-hierarchy to be based on QGraphicsItem instead of QObject. The QObject here is only used as a kludge to support signals and properties (the latter are necessary for animations). Remove a comment, which does not seem to be relevant after this change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/diveeventitem.cpp')
-rw-r--r--profile-widget/diveeventitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp
index 22c451e93..87e941387 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -12,7 +12,7 @@
extern struct ev_select *ev_namelist;
extern int evn_used;
-DiveEventItem::DiveEventItem(QObject *parent) : DivePixmapItem(parent),
+DiveEventItem::DiveEventItem(QGraphicsItem *parent) : DivePixmapItem(parent),
vAxis(NULL),
hAxis(NULL),
dataModel(NULL),