From 91086d08ad77b693c7fd1440f9403f84acae0794 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 2 Jul 2014 12:03:40 -0700 Subject: UI restructure: plotDive should just take one dive We don't have a concept of what to do when plotting multiple dives, so let's not pretend and remove all the messing around with lists. Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'qt-ui/profile/profilewidget2.cpp') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index f9186daf5..b4e9c6997 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -255,7 +255,7 @@ void ProfileWidget2::replot() { int diveId = dataModel->id(); dataModel->clear(); - plotDives(QList() << get_dive_by_uniq_id(diveId)); + plotDive(get_dive_by_uniq_id(diveId)); // why are we doing the get diveId here??? } void ProfileWidget2::setupItemSizes() @@ -354,7 +354,7 @@ void ProfileWidget2::setupSceneAndFlags() } // Currently just one dive, but the plan is to enable All of the selected dives. -void ProfileWidget2::plotDives(QList dives) +void ProfileWidget2::plotDive(struct dive *d) { static bool firstCall = true; QTime measureDuration; // let's measure how long this takes us (maybe we'll turn of TTL calculation later @@ -362,7 +362,6 @@ void ProfileWidget2::plotDives(QList dives) // I Know that it's a list, but currently we are // using just the first. - struct dive *d = dives.first(); if (!d) return; -- cgit v1.2.3-70-g09d2