mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
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:
parent
99ffc838cd
commit
c13737ca00
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user