Hi,

> On 05 Jan 2017, at 16:48, Robert Helling <[email protected]> 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.

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?

Best
Robert

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to