Pavel Sanda wrote:
> > I found a recipe which lets me reproduce the toolbar problem reliably:
> > Just touch any of the ui files (e.g. stdcontext.inc).  After the next
> > restart, the toolbar settings are lost.
>
> good detective work :)

And some luck :-)

The reason for this specific behaviour resides in GuiApplication::readUIFile.

This code (line 1540 in branch):

        QSettings settings;
        settings.beginGroup("ui_files");
        bool touched = false;
        for (int i = 0; i != uifiles.size(); ++i) {
                QFileInfo fi(uifiles[i]);
                QDateTime const date_value = fi.lastModified();
                QString const name_key = QString::number(i);
                if (!settings.contains(name_key)
                 || settings.value(name_key).toString() != uifiles[i]
                 || settings.value(name_key + "/date").toDateTime() != 
date_value) {
                        touched = true;
                        settings.setValue(name_key, uifiles[i]);
                        settings.setValue(name_key + "/date", date_value);
                }
        }
        settings.endGroup();
        if (touched)
                settings.remove("views");

explicitely removes the "views" group from settings if the UI files have been 
touched. So no wonder the toolbar settings are lost (they are part of this 
group).

I guess Abdel will tell us the reason for this behaviour, since he introduced 
this code here:
http://www.lyx.org/trac/changeset/26484

Jürgen

Reply via email to