mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Fix language change crash
This commit is contained in:
parent
0d76c5eb9c
commit
eb55328b62
@ -514,6 +514,7 @@ void MainWindow::CloseProfile()
|
||||
overview = nullptr;
|
||||
}
|
||||
|
||||
if (p_profile) {
|
||||
p_profile->StoreMachines();
|
||||
p_profile->UnloadMachineData();
|
||||
p_profile->saveChannels();
|
||||
@ -521,6 +522,7 @@ void MainWindow::CloseProfile()
|
||||
p_profile->removeLock();
|
||||
p_profile = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::Startup()
|
||||
@ -2220,14 +2222,9 @@ void MainWindow::on_actionHelp_Support_SleepyHead_Development_triggered()
|
||||
|
||||
void MainWindow::on_actionChange_Language_triggered()
|
||||
{
|
||||
// Pop up a message box asking if you would like to reset Channel event/waveform names
|
||||
// Sorry Translators who frequently language hop, this is an extra step, but this one is for the users. :/
|
||||
if (QMessageBox::question(this,STR_MessageBox_Warning,tr("Changing the language will reset custom Event and Waveform names/labels/descriptions.")+"\n\n"+tr("Are you sure you want to do this?"), QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
|
||||
CloseProfile();
|
||||
PREF.Save();
|
||||
// if (QMessageBox::question(this,STR_MessageBox_Warning,tr("Changing the language will reset custom Event and Waveform names/labels/descriptions.")+"\n\n"+tr("Are you sure you want to do this?"), QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
RestartApplication(true, "--language");
|
||||
}
|
||||
|
@ -127,6 +127,11 @@ win32 {
|
||||
LIBS += -lz
|
||||
}
|
||||
|
||||
MY_LIB_FILES += $${DESTDIR}/opengl32sw.dll
|
||||
extra_libs.files = MY_LIB_FILES
|
||||
extra_libs.path = $$DESTDIR
|
||||
INSTALLS += extra_libs
|
||||
|
||||
CONFIG += precompile_header
|
||||
PRECOMPILED_HEADER = pch.h
|
||||
HEADERS += pch.h
|
||||
|
Loading…
Reference in New Issue
Block a user