From a4608f7c91138401e9987ff0478bbe42408a37a7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 28 Jul 2015 13:35:04 -0700 Subject: 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 --- templatelayout.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'templatelayout.cpp') diff --git a/templatelayout.cpp b/templatelayout.cpp index 30919891a..1da88249b 100644 --- a/templatelayout.cpp +++ b/templatelayout.cpp @@ -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; -- cgit v1.2.3-70-g09d2