This PR fixes the PreferencesHelper to avoid writing to the preferences the first time a helper is created for a given Preferences object.
The issue was that on creation, PreferencesHelper._initialize was being called twice: once with notify=False and again with notify=True, as a result of the listener to the preferences trait. This PR avoids the second call by making that listener only run post creation (using post_init=True).
Closes #342
Closes #74
Checklist
[x] Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)
This PR fixes the
PreferencesHelper
to avoid writing to the preferences the first time a helper is created for a givenPreferences
object.The issue was that on creation,
PreferencesHelper._initialize
was being called twice: once withnotify=False
and again withnotify=True
, as a result of the listener to thepreferences
trait. This PR avoids the second call by making that listener only run post creation (usingpost_init=True
).Closes #342 Closes #74
Checklist