mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 13:38:14 +02:00
TAChart: Fix crash when Hide is called for an inactive chart tool.
This commit is contained in:
parent
c17363c521
commit
72a834edba
@ -2183,18 +2183,24 @@ end;
|
|||||||
|
|
||||||
procedure TBasicChartTool.Activate;
|
procedure TBasicChartTool.Activate;
|
||||||
begin
|
begin
|
||||||
FChart.FActiveToolIndex := Index;
|
if Assigned(FChart) then
|
||||||
FChart.MouseCapture := true;
|
begin
|
||||||
FChart.FDisablePopupMenu := false;
|
FChart.FActiveToolIndex := Index;
|
||||||
FStartMousePos := Mouse.CursorPos;
|
FChart.MouseCapture := true;
|
||||||
|
FChart.FDisablePopupMenu := false;
|
||||||
|
FStartMousePos := Mouse.CursorPos;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBasicChartTool.Deactivate;
|
procedure TBasicChartTool.Deactivate;
|
||||||
begin
|
begin
|
||||||
FChart.MouseCapture := false;
|
if Assigned(FChart) then
|
||||||
FChart.FActiveToolIndex := -1;
|
begin
|
||||||
if PopupMenuConflict then
|
FChart.MouseCapture := false;
|
||||||
FChart.FDisablePopupMenu := true;
|
FChart.FActiveToolIndex := -1;
|
||||||
|
if PopupMenuConflict then
|
||||||
|
FChart.FDisablePopupMenu := true;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBasicChartTool.PopupMenuConflict: Boolean;
|
function TBasicChartTool.PopupMenuConflict: Boolean;
|
||||||
|
@ -2211,7 +2211,7 @@ begin
|
|||||||
ADrawer.SetXor(false);
|
ADrawer.SetXor(false);
|
||||||
end;
|
end;
|
||||||
tdmNormal:
|
tdmNormal:
|
||||||
FChart.StyleChanged(Self);
|
if Assigned(FChart) then FChart.StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user