diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp index 8958fb929b..b13c91ad25 100644 --- a/clientgui/DlgAdvPreferences.cpp +++ b/clientgui/DlgAdvPreferences.cpp @@ -371,11 +371,11 @@ void CDlgAdvPreferences::ReadPreferenceSettings() { // max VM idle buffer.Printf(wxT("%.2f"),prefs.ram_max_used_idle_frac*100.0); *m_txtMemoryMaxOnIdle << buffer; + // suspend to memory + m_chkMemoryWhileSuspended->SetValue(prefs.leave_apps_in_memory); // max swap space (virtual memory) buffer.Printf(wxT("%.2f"),prefs.vm_max_used_frac*100.0); *m_txtDiskMaxSwap << buffer; - // suspend to memory - m_chkMemoryWhileSuspended->SetValue(prefs.leave_apps_in_memory); // ######### daily schedules page // do work between @@ -557,14 +557,14 @@ bool CDlgAdvPreferences::SavePreferencesSettings() { prefs.ram_max_used_idle_frac=td; mask.ram_max_used_idle_frac=true; // + prefs.leave_apps_in_memory = m_chkMemoryWhileSuspended->GetValue(); + mask.leave_apps_in_memory=true; + // m_txtDiskMaxSwap->GetValue().ToDouble(&td); td = RoundToHundredths(td); td = td / 100.0 ; prefs.vm_max_used_frac=td; mask.vm_max_used_frac=true; - // - prefs.leave_apps_in_memory = m_chkMemoryWhileSuspended->GetValue(); - mask.leave_apps_in_memory=true; // ######### daily schedules page diff --git a/clientgui/DlgAdvPreferencesBase.cpp b/clientgui/DlgAdvPreferencesBase.cpp index 1690a22d08..183d9b0671 100644 --- a/clientgui/DlgAdvPreferencesBase.cpp +++ b/clientgui/DlgAdvPreferencesBase.cpp @@ -623,7 +623,7 @@ wxPanel* CDlgAdvPreferencesBase::createDiskAndMemoryTab(wxNotebook* notebook) wxStaticBoxSizer* memoryUsageBoxSizer = new wxStaticBoxSizer( memoryUsageStaticBox, wxVERTICAL ); makeStaticBoxLabelItalic(memoryUsageStaticBox); - wxFlexGridSizer* memoryUsageGridSizer = new wxFlexGridSizer( 3, 3, 0, 0 ); + wxFlexGridSizer* memoryUsageGridSizer = new wxFlexGridSizer( 3, 0, 0 ); memoryUsageGridSizer->AddGrowableCol( 2 ); memoryUsageGridSizer->SetFlexibleDirection( wxHORIZONTAL ); memoryUsageGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -661,6 +661,14 @@ wxPanel* CDlgAdvPreferencesBase::createDiskAndMemoryTab(wxNotebook* notebook) staticText53->SetToolTip(MemoryMaxOnIdleTT); memoryUsageGridSizer->Add( staticText53, 0, wxALL, 5 ); + m_chkMemoryWhileSuspended = new wxCheckBox( memoryUsageStaticBox, ID_CHKMEMORYWHILESUSPENDED, _("Leave non-GPU tasks in memory while suspended"), wxDefaultPosition, wxDefaultSize, 0 ); + m_chkMemoryWhileSuspended->SetToolTip( _("If checked, suspended tasks stay in memory, and resume with no work lost. If unchecked, suspended tasks are removed from memory, and resume from their last checkpoint.") ); + + memoryUsageGridSizer->Add( m_chkMemoryWhileSuspended, 0, wxALL, 5 ); + + memoryUsageGridSizer->AddSpacer(1); + memoryUsageGridSizer->AddSpacer(1); + wxString DiskMaxSwapTT = wxEmptyString; DiskMaxSwapTT.Printf(_("Limit the swap space (page file) used by %s."), pSkinAdvanced->GetApplicationShortName().c_str()); @@ -679,11 +687,6 @@ wxPanel* CDlgAdvPreferencesBase::createDiskAndMemoryTab(wxNotebook* notebook) memoryUsageBoxSizer->Add( memoryUsageGridSizer, 0, wxEXPAND, 1 ); - m_chkMemoryWhileSuspended = new wxCheckBox( memoryUsageStaticBox, ID_CHKMEMORYWHILESUSPENDED, _("Leave non-GPU tasks in memory while suspended"), wxDefaultPosition, wxDefaultSize, 0 ); - m_chkMemoryWhileSuspended->SetToolTip( _("If checked, suspended tasks stay in memory, and resume with no work lost. If unchecked, suspended tasks are removed from memory, and resume from their last checkpoint.") ); - - memoryUsageBoxSizer->Add( m_chkMemoryWhileSuspended, 0, wxALL, 5 ); - diskAndMemoryBoxSizer->Add( memoryUsageBoxSizer, 0, wxALL|wxEXPAND, 1 ); diskMemoryTab->SetSizer( diskAndMemoryBoxSizer );