summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 21f0cb4e4..8f0d1584f 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1352,7 +1352,9 @@ void ProfileWidget2::keyEscAction()
void ProfileWidget2::plotPictures()
{
- qDeleteAll(pictures);
+ Q_FOREACH(DivePictureItem *item, pictures){
+ item->deleteLater();
+ }
pictures.clear();
if (printMode)
@@ -1368,7 +1370,7 @@ void ProfileWidget2::plotPictures()
continue;
DivePictureItem *item = new DivePictureItem();
item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value<QPixmap>());
- item->setFileUrl(m->index(i,0).data(Qt::DisplayPropertyRole).toString());
+ item->setFileUrl(m->index(i,1).data().toString());
// 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.seconds);