mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Instead of holding the index, hold the URL.
Since the idea is to remove the picture in the future, we need to not hold the row on the model, as when we delete one, the other pictures will change the row. but the QUrl is unique. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
75aafdc715
commit
1e6986d870
3 changed files with 12 additions and 14 deletions
|
@ -1366,8 +1366,9 @@ void ProfileWidget2::plotPictures()
|
|||
// information area.
|
||||
if (!pic->offset.seconds)
|
||||
continue;
|
||||
DivePictureItem *item = new DivePictureItem(i);
|
||||
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());
|
||||
// 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue