mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Speed up Theme Option Page load
Fixes #1245 The CheckChanged event was causing load settings to be called more than once on form load.
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Windows.Forms;
|
||||
using mRemoteNG.Themes;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using BrightIdeasSoftware;
|
||||
using mRemoteNG.UI.Forms.Input;
|
||||
|
||||
@@ -56,6 +55,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
|
||||
public override void LoadSettings()
|
||||
{
|
||||
themeEnableCombo.CheckedChanged -= themeEnableCombo_CheckedChanged;
|
||||
base.SaveSettings();
|
||||
//At first we cannot create or delete themes, depends later on the type of selected theme
|
||||
btnThemeNew.Enabled = false;
|
||||
@@ -81,6 +81,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
// reset to the default theme when disabling theme support
|
||||
_themeManager.ActiveTheme = _themeManager.DefaultTheme;
|
||||
}
|
||||
themeEnableCombo.CheckedChanged += themeEnableCombo_CheckedChanged;
|
||||
}
|
||||
|
||||
private void ListPalette_FormatCell(object sender, FormatCellEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user