FIX: fix issue STUDIO-558

Prompt the user to save the preset parameters when log out

Change-Id: I89dfeff7e702e3ba11cdf79d0ed7bc123e184e23
(cherry picked from commit 2031d17f1e698e3696fc7655cb093f53e6485028)
This commit is contained in:
zhimin.zeng 2022-08-01 18:01:40 +08:00 committed by Lane.Wei
parent cd73537f6f
commit f72213de4c
1 changed files with 6 additions and 0 deletions

View File

@ -2855,6 +2855,12 @@ void GUI_App::request_user_login(int online_login)
void GUI_App::request_user_logout()
{
if (m_agent) {
bool transfer_preset_changes = false;
wxString header = _L("Some presets are modified.") + "\n" +
_L("You can keep the modifield presets to the new project, discard or save changes as new presets.");
using ab = UnsavedChangesDialog::ActionButtons;
wxGetApp().check_and_keep_current_preset_changes(_L("User logged out"), header, ab::KEEP | ab::SAVE, &transfer_preset_changes);
m_agent->user_logout();
m_agent->set_user_selected_machine("");
/* delete old user settings */