mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: Generate DiveObjectHelpers on the fly
Instead of keeping track of a list of DiveObjectHelpers, generate them on-the-fly in DiveListModel. Thus, there is less danger of model and core getting out of sync. On the flip-side, now the DiveListModel and the DiveListSortModel might get out of sync. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
be763452ad
commit
f8c5c8bedf
4 changed files with 31 additions and 32 deletions
|
@ -67,6 +67,16 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) :
|
|||
{
|
||||
}
|
||||
|
||||
DiveObjectHelper::operator bool() const
|
||||
{
|
||||
return !!m_dive;
|
||||
}
|
||||
|
||||
bool DiveObjectHelper::operator!() const
|
||||
{
|
||||
return !m_dive;
|
||||
}
|
||||
|
||||
int DiveObjectHelper::number() const
|
||||
{
|
||||
return m_dive->number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue