aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 6c2395272..d75e065b8 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -905,10 +905,11 @@ void Ruler::setColor(const QColor& color)
setPen(defaultPen);
}
-Button::Button(QObject* parent, QGraphicsItem *itemParent): QObject(parent), QGraphicsRectItem(itemParent)
+Button::Button(QObject* parent, QGraphicsItem *itemParent) : QObject(parent),
+ QGraphicsRectItem(itemParent),
+ icon(new QGraphicsPixmapItem(this)),
+ text(new QGraphicsSimpleTextItem(this))
{
- icon = new QGraphicsPixmapItem(this);
- text = new QGraphicsSimpleTextItem(this);
icon->setPos(0,0);
text->setPos(0,0);
setFlag(ItemIgnoresTransformations);