- only reset settings if a file with Toolbars has changed. This should significantly decrease
the number of circumstances where the settings are lost unnecessarily.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30317
a592a061-630c-0410-9148-
cb99ea01b6c8
if (lyxerr.debugging(Debug::PARSER))
lex.printTable(lyxerr);
if (lyxerr.debugging(Debug::PARSER))
lex.printTable(lyxerr);
+ // store which ui files define Toolbars
+ static QStringList toolbar_uifiles;
+
while (lex.isOK()) {
switch (lex.lex()) {
case ui_include: {
while (lex.isOK()) {
switch (lex.lex()) {
case ui_include: {
case ui_toolbars:
d->toolbars_.readToolbarSettings(lex);
case ui_toolbars:
d->toolbars_.readToolbarSettings(lex);
+ toolbar_uifiles.push_back(uifile);
QFileInfo fi(uifiles[i]);
QDateTime const date_value = fi.lastModified();
QString const name_key = QString::number(i);
QFileInfo fi(uifiles[i]);
QDateTime const date_value = fi.lastModified();
QString const name_key = QString::number(i);
- if (!settings.contains(name_key)
+ // if an ui file which defines Toolbars has changed,
+ // we have to reset the settings
+ if (toolbar_uifiles.contains(uifiles[i])
+ && (!settings.contains(name_key)
|| settings.value(name_key).toString() != uifiles[i]
|| settings.value(name_key).toString() != uifiles[i]
- || settings.value(name_key + "/date").toDateTime() != date_value) {
+ || settings.value(name_key + "/date").toDateTime() != date_value)) {
touched = true;
settings.setValue(name_key, uifiles[i]);
settings.setValue(name_key + "/date", date_value);
touched = true;
settings.setValue(name_key, uifiles[i]);
settings.setValue(name_key + "/date", date_value);