it compiles, it must be perfect

Dirk Hohndel dirk at hohndel.org
Thu Jul 3 22:05:33 PDT 2014


On Fri, Jul 04, 2014 at 06:53:52AM +0200, Robert C. Helling wrote:
> 
> 
> > Am 04.07.2014 um 00:01 schrieb Dirk Hohndel <dirk at hohndel.org>:
> > 
> > LOT of the underlying architecture for the UI has been
> > completely restructured.
> 
> Could you please explain in a few sentences how it is supposed to work?
> How did you get rid if the staging dive for example?

We now have one static global struct dive that holds the dive that is
currently shown / edited / planned / added. We no longer play games with
copying some parts of the dive here and some parts there and having random
other variables that hold pointers to dive structures that are randomly
added to or deleted from the dive list.

So when you add or plan a dive, the displayed_dive is initialized
accordingly and shown. All editing / planning happens on this dive.
If the user saves the changes they are copied back into the selected
dive(s). If the user saves a new dive / planned dive, then a copy of this
dive is made and added to the dive list.

Makes sense?

It's really straight forward and made the code a lot easier.

/D


More information about the subsurface mailing list