Tissue Saturation Graph not showing on second dive

Dirk Hohndel dirk at hohndel.org
Thu Jan 5 08:31:56 PST 2017


> On Jan 5, 2017, at 8:00 AM, Robert Helling <helling at atdotde.de> wrote:
> 
> Hi,
> 
>> On 05 Jan 2017, at 16:48, Robert Helling <helling at atdotde.de <mailto:helling at atdotde.de>> wrote:
>> 
>> or to be more specific: It seems to me that SettingsObjectWrapper::sync() never gets called. And the reason for that might be that there is no call for it anywhere in the codeā€¦
>> 
> 
> and there is another problem: There seems to be a total confusion between
> 
> prefs.deco_mode
> 
> and
> 
> prefs.display_deco_mode.
> 
> The current state is utter non-sense. Tomas, (according to git blame you introduced the latter) could you please explain the meaning of the two and in particular their difference?
> 
> Here is my guess: There are two, because one is set in the preferences while the other is a planner parameter. They do the same thing but when chaining the value in the planner, the display of logged dives should not be affected.

Yes, that was indeed the logic.

> So my suggestion would be to resolve this as follows: Rename deco_mode to planner_deco_mode. In all the code, when we need to inquire the current deco mode, we replace the access to the value by a getter that essentially does
> 
> currentState == PLAN ? prefs.planner_deco_mode : prefs.display_deco_mode;
> 
> What do you think?

I think this makes sense.

/D

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170105/3e6d6c4f/attachment.html>


More information about the subsurface mailing list