* Fixed TfrmHueSettings not freeing the preset doc

This commit is contained in:
Andreas Schneider 2011-10-03 20:32:46 +02:00
parent d2f7bdc54f
commit 395c8fbe96
3 changed files with 17 additions and 11 deletions

View File

@ -17,9 +17,9 @@
<VersionInfo> <VersionInfo>
<UseVersionInfo Value="True"/> <UseVersionInfo Value="True"/>
<MinorVersionNr Value="6"/> <MinorVersionNr Value="6"/>
<RevisionNr Value="1"/> <RevisionNr Value="2"/>
<BuildNr Value="209"/> <BuildNr Value="223"/>
<StringTable CompanyName="AKS DataBasis" FileDescription="UO CentrED" InternalName="CentrED" LegalCopyright="Andreas Schneider" OriginalFilename="CentrED.exe" ProductName="CentrED" ProductVersion="0.6.1"/> <StringTable CompanyName="AKS DataBasis" ProductName="CentrED" InternalName="CentrED" LegalCopyright="Andreas Schneider" ProductVersion="0.6.2" FileDescription="UO CentrED" OriginalFilename="CentrED.exe"/>
</VersionInfo> </VersionInfo>
<BuildModes Count="3"> <BuildModes Count="3">
<Item1 Name="default" Default="True"/> <Item1 Name="default" Default="True"/>
@ -50,6 +50,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsAuto"/>
<UseLineInfoUnit Value="False"/> <UseLineInfoUnit Value="False"/>
<StripSymbols Value="True"/> <StripSymbols Value="True"/>
</Debugging> </Debugging>
@ -98,6 +99,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsAuto"/>
<UseLineInfoUnit Value="False"/> <UseLineInfoUnit Value="False"/>
<StripSymbols Value="True"/> <StripSymbols Value="True"/>
</Debugging> </Debugging>
@ -134,7 +136,7 @@
<RequiredPackages Count="6"> <RequiredPackages Count="6">
<Item1> <Item1>
<PackageName Value="LCLBase"/> <PackageName Value="LCLBase"/>
<MinVersion Major="1" Release="1" Valid="True"/> <MinVersion Major="1" Valid="True" Release="1"/>
</Item1> </Item1>
<Item2> <Item2>
<PackageName Value="multiloglaz"/> <PackageName Value="multiloglaz"/>
@ -148,11 +150,11 @@
</Item4> </Item4>
<Item5> <Item5>
<PackageName Value="lnetvisual"/> <PackageName Value="lnetvisual"/>
<MinVersion Minor="5" Release="3" Valid="True"/> <MinVersion Minor="5" Valid="True" Release="3"/>
</Item5> </Item5>
<Item6> <Item6>
<PackageName Value="virtualtreeview_package"/> <PackageName Value="virtualtreeview_package"/>
<MinVersion Major="4" Minor="5" Release="1" Valid="True"/> <MinVersion Major="4" Minor="5" Valid="True" Release="1"/>
</Item6> </Item6>
</RequiredPackages> </RequiredPackages>
<Units Count="46"> <Units Count="46">
@ -454,12 +456,9 @@
<Linking> <Linking>
<Debugging> <Debugging>
<GenerateDebugInfo Value="True"/> <GenerateDebugInfo Value="True"/>
<DebugInfoType Value="dsStabs"/>
<UseHeaptrc Value="True"/>
</Debugging> </Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking> </Linking>
<Other> <Other>
<CompilerMessages> <CompilerMessages>

View File

@ -9,6 +9,7 @@ inherited frmHueSettings: TfrmHueSettings
ClientWidth = 225 ClientWidth = 225
Constraints.MinWidth = 225 Constraints.MinWidth = 225
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy
object lblHue: TLabel[0] object lblHue: TLabel[0]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = edHue AnchorSideTop.Control = edHue

View File

@ -60,6 +60,7 @@ type
procedure cbRandomPresetChange(Sender: TObject); procedure cbRandomPresetChange(Sender: TObject);
procedure edHueEditingDone(Sender: TObject); procedure edHueEditingDone(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect; procedure lbHueDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
State: TOwnerDrawState); State: TOwnerDrawState);
procedure lbHueSelectionChange(Sender: TObject; User: boolean); procedure lbHueSelectionChange(Sender: TObject; User: boolean);
@ -229,6 +230,11 @@ begin
LoadRandomPresets; LoadRandomPresets;
end; end;
procedure TfrmHueSettings.FormDestroy(Sender: TObject);
begin
FreeAndNil(FRandomHuePresetsDoc);
end;
procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer; procedure TfrmHueSettings.lbHueDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState); ARect: TRect; State: TOwnerDrawState);
var var