LCL, CoolBar: cleanup

git-svn-id: trunk@40504 -
This commit is contained in:
juha 2013-03-07 16:34:27 +00:00
parent 839114134b
commit c0e4e802d9
2 changed files with 4 additions and 3 deletions

View File

@ -2255,7 +2255,6 @@ type
FImageChangeLink: TChangeLink;
FShowText: Boolean;
FVertical: Boolean;
FNewControl: TControl;
FOnChange: TNotifyEvent;
function GrabLeft: integer;
function GetAlign: TAlign;

View File

@ -247,9 +247,11 @@ begin
if FControl = aValue then Exit;
FCoolBar.BeginUpdate;
try
if Assigned(aValue) then begin
if Assigned(aValue) then
begin
Band := TCoolBands(Collection).FindBand(aValue);
if Assigned(Band) and (Band <> Self) then begin
if Assigned(Band) and (Band <> Self) then
begin
Band.ResetControlProps;
Band.SetControl(Nil); // Remove old association
end;