From 352afa5b7b27f7783344f1878fcfa1fae1001db1 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Mon, 10 Jun 2019 23:28:57 +0300 Subject: [PATCH] fixed sky changing --- src/editor/f_addresource_sky.pas | 3 +++ src/editor/f_mapoptions.lfm | 4 +--- src/editor/f_mapoptions.pas | 9 +++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/editor/f_addresource_sky.pas b/src/editor/f_addresource_sky.pas index c01815a..79362df 100644 --- a/src/editor/f_addresource_sky.pas +++ b/src/editor/f_addresource_sky.pas @@ -61,7 +61,10 @@ begin InitImage(img); if not LoadImageFromMemory(TextureData, ImageSize, img) then + begin + FreeMem(TextureData); Exit; + end; Width := img.width; Height := img.height; diff --git a/src/editor/f_mapoptions.lfm b/src/editor/f_mapoptions.lfm index d1fa014..28294a8 100644 --- a/src/editor/f_mapoptions.lfm +++ b/src/editor/f_mapoptions.lfm @@ -12,7 +12,7 @@ object MapOptionsForm: TMapOptionsForm Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' - OnActivate = FormActivate + OnCreate = FormCreate Position = poScreenCenter ShowHint = True LCLVersion = '1.6.4.0' @@ -640,7 +640,6 @@ object MapOptionsForm: TMapOptionsForm Top = 147 Width = 278 Color = clBtnFace - OnChange = eMapDescriptionChange ReadOnly = True TabStop = False TabOrder = 4 @@ -651,7 +650,6 @@ object MapOptionsForm: TMapOptionsForm Top = 187 Width = 278 Color = clBtnFace - OnChange = eMapDescriptionChange ReadOnly = True TabStop = False TabOrder = 7 diff --git a/src/editor/f_mapoptions.pas b/src/editor/f_mapoptions.pas index d86ff0e..a69c5cf 100644 --- a/src/editor/f_mapoptions.pas +++ b/src/editor/f_mapoptions.pas @@ -77,7 +77,7 @@ type bOK: TButton; bCancel: TButton; - procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); procedure bCancelClick(Sender: TObject); procedure bOKClick(Sender: TObject); @@ -122,10 +122,8 @@ begin Result := True; end; -// Form processing -procedure TMapOptionsForm.FormActivate(Sender: TObject); -var - a, b: Integer; +procedure TMapOptionsForm.FormCreate(Sender: TObject); + var a, b: Integer; begin // General map options eMapName.Text := gMapInfo.Name; @@ -174,7 +172,6 @@ begin if gTriggers[a].TriggerType <> 0 then b := b + 1; lTriggerCount.Caption := IntToStr(b); - end; procedure TMapOptionsForm.bCancelClick(Sender: TObject); -- 2.29.2