mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
LCL: image list: write BitmapAdv only if necessary.
git-svn-id: trunk@57262 -
This commit is contained in:
parent
c4591d203a
commit
fc6109b79c
@ -1532,13 +1532,23 @@ procedure TCustomImageList.DefineProperties(Filer: TFiler);
|
||||
Result := Count > 0;
|
||||
end;
|
||||
|
||||
function NeedsBitmapAdv: Boolean;
|
||||
var
|
||||
R: TCustomImageListResolution;
|
||||
begin
|
||||
for R in Resolutions do
|
||||
if not R.AutoCreatedInDesignTime and (R.Width<>Width) then
|
||||
Exit(True);
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
var
|
||||
ADoWrite: Boolean;
|
||||
begin
|
||||
inherited DefineProperties(Filer);
|
||||
ADoWrite := DoWrite;
|
||||
Filer.DefineBinaryProperty('Bitmap', @ReadData, @WriteData, ADoWrite);
|
||||
Filer.DefineBinaryProperty('BitmapAdv', @ReadAdvData, @WriteAdvData, ADoWrite);
|
||||
Filer.DefineBinaryProperty('BitmapAdv', @ReadAdvData, @WriteAdvData, ADoWrite and NeedsBitmapAdv);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user