summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-10 15:04:27 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-10 09:58:42 -0800
commit691fbabb7aac6467df5db0b784220fd7c0b92214 (patch)
tree8fba01305ffdff308e14ec379a0d563cf16c84f4 /qt-ui
parentbb71707321cdb0f47861ee91cd0ef6fa5e415778 (diff)
downloadsubsurface-691fbabb7aac6467df5db0b784220fd7c0b92214.tar.gz
Do not add the items to the scene twice.
Those items have parent(), which means that when the parent has a scene, they are automatically added and removed from the scene. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 5bb0d9498..143b0f90c 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -397,7 +397,6 @@ void DiveCartesianPlane::setup()
line->setZValue(-1);
line->setPen(gridPen());
horizontalLines.push_back(line);
- scene()->addItem(line);
}
for (int i = bottomAxis->minimum(), max = bottomAxis->maximum(); i < max; i += 600) { // increments by 10 minutes.
@@ -407,7 +406,6 @@ void DiveCartesianPlane::setup()
line->setZValue(-1);
line->setPen(gridPen());
verticalLines.push_back(line);
- scene()->addItem(line);
}
}