From fe1e1468ee7bc0ad57f03057098150248358966b Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 7 Sep 2015 15:46:46 +0200 Subject: [PATCH] fix some error in #35 implementation - wrong filename saved - AV on exit because entity not removed from list --- src/ce_main.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ce_main.pas b/src/ce_main.pas index 4ef1295f..6f6d7ec9 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -369,6 +369,7 @@ type function optionedOptionsModified: boolean; public constructor Create(AOwner: TComponent); override; + destructor Destroy; override; procedure assign(src: TPersistent); override; procedure assignTo(dst: TPersistent); override; end; @@ -390,6 +391,12 @@ begin EntitiesConnector.addObserver(self); end; +destructor TCEApplicationOptions.Destroy; +begin + EntitiesConnector.removeObserver(self); + inherited; +end; + procedure TCEApplicationOptions.assign(src: TPersistent); begin if src = CEMainForm then @@ -870,7 +877,7 @@ begin end; // globals opts fAppliOpts.assign(self); - fAppliOpts.saveToFile(getCoeditDocPath + 'global.txt'); + fAppliOpts.saveToFile(getCoeditDocPath + 'application.txt'); end; procedure TCEMainForm.SaveDocking;