Printing: fix dive lookup for profile generation

The existing code (and templates) looked up dives by number and then used
that as index into the dive table. This worked exactly in one case: if all
dives were numbered consecutively starting with 1. While that is not an
entirely unreasonable case, it's of course not an acceptable assumption to
make.

This commit adds the necessary changes to instead look up dives by their
unique id. That's what it's there fore, after all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-07-28 13:35:04 -07:00
parent be47ce6241
commit a4608f7c91
5 changed files with 15 additions and 4 deletions

View file

@ -133,6 +133,11 @@ int Dive::number() const
return m_number;
}
int Dive::id() const
{
return m_id;
}
QString Dive::date() const
{
return m_date;