mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
Small fixes for serialization and the enumerator, still didn't fix the counting
This commit is contained in:
parent
515170e44b
commit
efb4807cd1
4 changed files with 86 additions and 51 deletions
|
@ -31,7 +31,7 @@ namespace Greenshot.Drawing.Fields {
|
|||
/// <summary>
|
||||
/// Basic IFieldHolder implementation, providing access to a set of fields
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
[Serializable]
|
||||
public abstract class AbstractFieldHolder : IFieldHolder {
|
||||
private static readonly ILog LOG = LogManager.GetLogger(typeof(AbstractFieldHolder));
|
||||
private static EditorConfiguration editorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
|
||||
|
@ -54,9 +54,9 @@ namespace Greenshot.Drawing.Fields {
|
|||
|
||||
public AbstractFieldHolder() {}
|
||||
|
||||
[OnDeserialized()]
|
||||
[OnDeserialized]
|
||||
private void OnDeserialized(StreamingContext context) {
|
||||
fieldsByType = new Dictionary<FieldType, Field>();
|
||||
fieldsByType = new Dictionary<FieldType, Field>();
|
||||
// listen to changing properties
|
||||
foreach(Field field in fields) {
|
||||
field.PropertyChanged += delegate {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue