diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index b2021fd8c..05ddeedbd 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -1311,8 +1311,11 @@ void ProfileWidget2::plotPictures() continue; DivePictureItem *item = new DivePictureItem(); item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value<QPixmap>()); - // TODO: put the item in the correct place. use the pic.timestamp to find where it belongs on the dive. - item->setPos(10 ,10); + // 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. + qreal x = timeAxis->posAtValue(pic->timestamp - current_dive->when); + qreal y = 10; + item->setPos(x, y); item->setFlag(QGraphicsItem::ItemIgnoresTransformations); scene()->addItem(item); pictures.push_back(item); |