>>> In GuiApplication::readUIFile() the settings for views gets removed if the
>>> ui file is newer than the saved timestamp in the settings.
>>> Later the non existing settings will be used to initialize the visibility.
>>> The default value for a non existing setting is 0.
>>>
> I say yes.

But we are not there yet.

My fix shouldn't be necessary as GuiView::restoreLayout() will return
false when the settings for the views are removed due to the
following:

{{{
bool GuiView::restoreLayout() {
      [...]
        if (!settings.contains(icon_key))
                return false;
      [...]
}
}}}

If it returns false, initToolbars() will be called and the values get
the original value.

BUT, I have found the following recipe by looking at the sourcecode

1. Modify default.ui,
2. Run LyX (without the patch of course),
3. Modify Preferences,
- Now resetDialogs() calls saveLayout() and restoreLayout(), but
saveLayout doesn't save the toolbar and window setting. Then
restoreLayout restores everything to 0.
4. Close LyX.
- Now, the data in the registry is all 0.

Vincent

Reply via email to