Explorar o código

fixed issue with saving the theme in options

scott brogden %!s(int64=8) %!d(string=hai) anos
pai
achega
7b96eff781
Modificáronse 1 ficheiros con 24 adicións e 0 borrados
  1. 24 0
      OptionsGeneral.cpp

+ 24 - 0
OptionsGeneral.cpp

@@ -285,6 +285,30 @@ BOOL COptionsGeneral::OnApply()
 	}
 
 	CGetSetOptions::SetQuickPastePosition(m_popupPositionCombo.GetItemData(m_popupPositionCombo.GetCurSel()));
+
+	CString currentTheme = g_Opt.GetTheme();
+
+	CString csTheme;
+	if (m_cbTheme.GetCurSel() >= 0)
+	{
+		m_cbTheme.GetLBText(m_cbTheme.GetCurSel(), csTheme);
+		if (csTheme == DEFAULT_THEME)
+		{
+			g_Opt.SetTheme("");
+			csTheme = _T("");
+		}
+		else
+			g_Opt.SetTheme(csTheme);
+	}
+	else
+	{
+		g_Opt.SetTheme("");
+	}
+
+	if (currentTheme != csTheme)
+	{
+		m_pParent->m_themeChanged = TRUE;
+	}
 	
 	return CPropertyPage::OnApply();
 }