mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 12:44:00 +02:00
* Fixed memleakfix (r14889) so asignment works if TBitmap is separte class
git-svn-id: trunk@14894 -
This commit is contained in:
parent
dc7a8752ac
commit
481f2563c1
@ -470,6 +470,7 @@ var
|
|||||||
CurPageIndex: Integer;
|
CurPageIndex: Integer;
|
||||||
j: Integer;
|
j: Integer;
|
||||||
OldActivePage: String;
|
OldActivePage: String;
|
||||||
|
B: TBitmap;
|
||||||
begin
|
begin
|
||||||
if fUpdatingNotebook then exit;
|
if fUpdatingNotebook then exit;
|
||||||
if IsUpdateLocked then begin
|
if IsUpdateLocked then begin
|
||||||
@ -552,7 +553,12 @@ begin
|
|||||||
+'_'+CurComponent.ComponentClass.ClassName;
|
+'_'+CurComponent.ComponentClass.ClassName;
|
||||||
// Left and Top will be set in ReAlignButtons.
|
// Left and Top will be set in ReAlignButtons.
|
||||||
SetBounds(Left,Top,ComponentPaletteBtnWidth,ComponentPaletteBtnHeight);
|
SetBounds(Left,Top,ComponentPaletteBtnWidth,ComponentPaletteBtnHeight);
|
||||||
Glyph := CurComponent.Icon;
|
// we cannot assing a custombitmap directly, so force a glyph
|
||||||
|
B := TBitmap.Create;
|
||||||
|
Glyph := B;
|
||||||
|
B.Free;
|
||||||
|
// we now have a glyp so we can assign
|
||||||
|
Glyph.Assign(CurComponent.Icon);
|
||||||
GroupIndex := 1;
|
GroupIndex := 1;
|
||||||
Flat := true;
|
Flat := true;
|
||||||
OnClick := @ComponentBtnClick;
|
OnClick := @ComponentBtnClick;
|
||||||
|
Loading…
Reference in New Issue
Block a user