Merged revision(s) 52090 #dc69b0c0a5 from trunk:

TAChart: Fix crash of GUI when TChartStyles is deleted.
........

git-svn-id: branches/fixes_1_6@52127 -
This commit is contained in:
maxim 2016-04-06 22:03:36 +00:00
parent 99ffc838cd
commit c13737ca00

View File

@ -460,7 +460,7 @@ implementation
uses
Clipbrd, Dialogs, GraphMath, LCLProc, LResources, Math, TADrawerCanvas,
TAGeometry, TAMath, Types;
TAGeometry, TAMath, TAStyles, Types;
function CompareZPosition(AItem1, AItem2: Pointer): Integer;
begin
@ -1250,11 +1250,19 @@ begin
end;
procedure TChart.Notification(AComponent: TComponent; AOperation: TOperation);
var
ax: TChartAxis;
begin
if (AOperation = opRemove) and (AComponent = Toolset) then
FToolset := nil
else if (AOperation = opRemove) and (AComponent = GUIConnector) then
GUIConnector := nil;
GUIConnector := nil
else if (AOperation = opRemove) and (AComponent is TChartStyles) then begin
for ax in FAxisList do
if ax.Marks.Stripes = AComponent then
ax.Marks.Stripes := nil;
end;
inherited Notification(AComponent, AOperation);
end;