mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Get rid of pointers to dive structures in the UI
The assumption that the pointer will keep pointing to a valid structure is fundamentally flawed. And even if that is true today, it might change in the future - just don't do it. Use the diveId instead. The exception is when you own the structure and use it within one UI interaction during which any way to change the dive_table is disabled (e.g., while adding / editing a dive). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9c617534a0
commit
c3fe1a9e9f
5 changed files with 72 additions and 26 deletions
|
|
@ -190,7 +190,7 @@ private:
|
|||
QBrush defaultBrush;
|
||||
ToolTipItem *toolTip;
|
||||
graphics_context gc;
|
||||
struct dive *dive;
|
||||
int diveId;
|
||||
struct divecomputer *diveDC;
|
||||
int zoomLevel;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue