From 691fbabb7aac6467df5db0b784220fd7c0b92214 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 10 Feb 2014 15:04:27 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/divecartesianaxis.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'qt-ui/profile') 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); } } -- cgit v1.2.3-70-g09d2