mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed excessive Inifile writing! Added a simple resize method wrapper for Thumbnails.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1770 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
4e13e13f47
commit
2b8b3c7a62
3 changed files with 22 additions and 9 deletions
|
@ -128,6 +128,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// Store all GreenshotControl values to the configuration
|
||||
/// </summary>
|
||||
protected void StoreFields() {
|
||||
bool iniDirty = false;
|
||||
foreach (FieldInfo field in this.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
|
||||
if (!field.FieldType.IsSubclassOf(typeof(Control))) {
|
||||
continue;
|
||||
|
@ -137,7 +138,6 @@ namespace GreenshotPlugin.Controls {
|
|||
}
|
||||
Object controlObject = field.GetValue(this);
|
||||
IGreenshotConfigBindable configBindable = controlObject as IGreenshotConfigBindable;
|
||||
bool iniDirty = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(configBindable.SectionName) && !string.IsNullOrEmpty(configBindable.PropertyName)) {
|
||||
IniSection section = IniConfig.GetIniSection(configBindable.SectionName);
|
||||
|
@ -160,9 +160,9 @@ namespace GreenshotPlugin.Controls {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (iniDirty) {
|
||||
IniConfig.Save();
|
||||
}
|
||||
}
|
||||
if (iniDirty) {
|
||||
IniConfig.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue