Skip to content

Commit 7f478bc

Browse files
committed
On language switch changed settings settings are lost
In case of language switch and already changed settings these settings were lost, now the usual question is asked.
1 parent 33e0380 commit 7f478bc

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

addon/doxywizard/doxywizard.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,14 @@ void MainWindow::switchLanguage()
463463
qDebug() << "selected language" << langCode;
464464
if (langCode!=DoxygenWizard::langCode)
465465
{
466-
setLanguage(langCode);
467466
// Restart the application
468-
qApp->quit();
469-
QProcess::startDetached(qApp->arguments()[0], qApp->arguments().mid(1));
467+
if (discardUnsavedChanges())
468+
{
469+
setLanguage(langCode);
470+
saveSettings();
471+
qApp->quit();
472+
QProcess::startDetached(qApp->arguments()[0], qApp->arguments().mid(1));
473+
}
470474
}
471475
}
472476
}

0 commit comments

Comments
 (0)