mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
b0983d9d13
commit
a26719c541
5 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue