From a26719c5419754b24a16b7c8163d236eae765a6d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 9 Jun 2014 09:38:50 -0700 Subject: Picture handling: switch to stronger typed offset Also change the on file XML to be even easier to read by making it a duration as well (which gets us '32:34 min' instead of un-typed seconds). This is backwards compatible, it will happily read what was written with the previous commit). Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index c709e9389..f0a58a387 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -1307,13 +1307,13 @@ void ProfileWidget2::plotPictures() struct picture *pic = (struct picture*) m->index(i,1).data(Qt::UserRole).value(); // it's a correct picture, but doesn't have a timestamp: only show on the widget near the // information area. - if (!pic->offset) + if (!pic->offset.seconds) continue; DivePictureItem *item = new DivePictureItem(); item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value()); // let's put the picture at the correct time, but at a fixed "depth" on the profile // not sure this is ideal, but it seems to look right. - x = timeAxis->posAtValue(pic->offset); + x = timeAxis->posAtValue(pic->offset.seconds); if (i == 0) y = 10; else -- cgit v1.2.3-70-g09d2