diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-09 09:38:50 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-09 09:38:50 -0700 |
commit | a26719c5419754b24a16b7c8163d236eae765a6d (patch) | |
tree | 6c735fa8d100686cd06c679584c3632b41347b00 /qt-ui/profile | |
parent | b0983d9d13d2d967d52a0fbbc1052f7f6eca840a (diff) | |
download | subsurface-a26719c5419754b24a16b7c8163d236eae765a6d.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<void*>(); // 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<QPixmap>()); // 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 |