mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 21:39:12 +02:00
LCL: TButtonGlyph: clear ExternalImages on Glyph change and assign
git-svn-id: trunk@57719 -
This commit is contained in:
parent
739bb2364f
commit
d97dbf63c9
@ -170,7 +170,12 @@ begin
|
|||||||
if FOriginal = Value then
|
if FOriginal = Value then
|
||||||
exit;
|
exit;
|
||||||
if FOriginal = nil then
|
if FOriginal = nil then
|
||||||
FOriginal := TGlyphBitmap.Create(Self);
|
FOriginal := TGlyphBitmap.Create(Self)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FExternalImages := nil;
|
||||||
|
FExternalImageIndex := -1;
|
||||||
|
end;
|
||||||
FOriginal.OnChange := nil;
|
FOriginal.OnChange := nil;
|
||||||
FOriginal.Assign(Value);
|
FOriginal.Assign(Value);
|
||||||
FOriginal.OnChange := @GlyphChanged;
|
FOriginal.OnChange := @GlyphChanged;
|
||||||
@ -235,6 +240,8 @@ begin
|
|||||||
FImagesCache := GetImageListCache;
|
FImagesCache := GetImageListCache;
|
||||||
FImagesCache.RegisterListener(Self);
|
FImagesCache.RegisterListener(Self);
|
||||||
FImagesCache.RegisterBitmap(Self, FOriginal, NumGlyphs);
|
FImagesCache.RegisterBitmap(Self, FOriginal, NumGlyphs);
|
||||||
|
FExternalImageIndex := -1;
|
||||||
|
FExternalImages := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Sender = FOriginal then
|
if Sender = FOriginal then
|
||||||
|
Loading…
Reference in New Issue
Block a user