Answering on the phone. Robert, the difference on the preferences for deco mode is what you described - one is for the planner and other is for the display. I tougth id fixed the issue you described to me in your house - and I think I did, but in the end I created another issue. The getter idea seems correct, sorry for the confusion.
Btw - sync and load are being called because your preferences are saved and restored :) On Thu, 5 Jan 2017 at 19:32, Dirk Hohndel <[email protected]> wrote: > On Jan 5, 2017, at 8:00 AM, Robert Helling <[email protected]> wrote: > > 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. > > > 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 > > > > > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > "Subsurface Divelog" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > > To post to this group, send email to [email protected]. > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/subsurface-divelog/57EF1A4A-0883-4475-9E84-0618CA72EBAF%40hohndel.org > <https://groups.google.com/d/msgid/subsurface-divelog/57EF1A4A-0883-4475-9E84-0618CA72EBAF%40hohndel.org?utm_medium=email&utm_source=footer> > . > > > For more options, visit https://groups.google.com/d/optout. > > >
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
