Skip to content

Commit

Permalink
Refs #95. Fixed crash on Mac OS on language change
Browse files Browse the repository at this point in the history
  • Loading branch information
SBriere committed Oct 10, 2024
1 parent 2d6519a commit 14150be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/main/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,13 +730,18 @@ void MainWindow::com_downloadCompleted(DownloadingFile *file)

void MainWindow::com_preferencesUpdated()
{
qDebug() << m_currentLanguage << m_comManager->getCurrentPreferences().getLanguage();
// qDebug() << m_currentLanguage << m_comManager->getCurrentPreferences().getLanguage();
if (m_currentLanguage != m_comManager->getCurrentPreferences().getLanguage()){ // Filter initial language change
m_currentLanguage = m_comManager->getCurrentPreferences().getLanguage();
GlobalMessageBox msg;
if (msg.showYesNo(tr("Changement de langue"), tr("La langue a été modifiée.\nSouhaitez-vous vous déconnecter pour appliquer les changements?")) == QMessageBox::Yes){
if (m_diag_editor){
m_diag_editor->close();
delete m_diag_editor;
m_diag_editor = nullptr;
}
emit logout_request();
}
m_currentLanguage = m_comManager->getCurrentPreferences().getLanguage();
}
}

Expand Down

0 comments on commit 14150be

Please sign in to comment.