From 630862971fc314439dfa6d274474eb18e8f96711 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 4 Mar 2018 01:01:52 +0100 Subject: 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 --- profile-widget/diveeventitem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profile-widget/diveeventitem.h') diff --git a/profile-widget/diveeventitem.h b/profile-widget/diveeventitem.h index f56a92898..867b89f31 100644 --- a/profile-widget/diveeventitem.h +++ b/profile-widget/diveeventitem.h @@ -11,7 +11,7 @@ struct event; class DiveEventItem : public DivePixmapItem { Q_OBJECT public: - DiveEventItem(QObject *parent = 0); + DiveEventItem(QGraphicsItem *parent = 0); virtual ~DiveEventItem(); void setEvent(struct event *ev, struct gasmix *lastgasmix); struct event *getEvent(); -- cgit v1.2.3-70-g09d2