Previous changes created problems with the context-menu, as it was still referencing an icon that we dispose at icon size change. This change introduces a PropertyChanged event object to the CoreConfiguration so those interested can register to changes (currently only the IconSize), and apply the correct menu image.

This commit is contained in:
RKrom 2014-11-11 14:13:13 +01:00
commit e0c9fc1f7b
5 changed files with 96 additions and 66 deletions

View file

@ -368,7 +368,6 @@ namespace Greenshot {
numericUpDown_daysbetweencheck.Value = coreConfiguration.UpdateCheckInterval;
numericUpDown_daysbetweencheck.Enabled = !coreConfiguration.Values["UpdateCheckInterval"].IsFixed;
coreConfiguration.FixIconSize();
numericUpdownIconSize.Value = (coreConfiguration.IconSize.Width /16) * 16;
CheckDestinationSettings();
}
@ -417,12 +416,6 @@ namespace Greenshot {
Size previousValue = coreConfiguration.IconSize;
coreConfiguration.IconSize = new Size((int)numericUpdownIconSize.Value, (int)numericUpdownIconSize.Value);
// Clear caches when changing the settings
if (previousValue != coreConfiguration.IconSize) {
PluginUtils.ClearExeIconCache();
MainForm.ResetImageScalingSize();
}
coreConfiguration.FixIconSize();
try {
if (checkbox_autostartshortcut.Checked) {
// It's checked, so we set the RunUser if the RunAll isn't set.