mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 10:10:31 +02:00
TAChart: Fix charteditor demo crashing when compiled with -CR
git-svn-id: trunk@65020 -
This commit is contained in:
parent
37a8b37c8f
commit
21890d5c7b
@ -23,7 +23,6 @@ object TitleFootEditor: TTitleFootEditor
|
||||
OKButton.OnClick = OKButtonClick
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.Caption = 'Apply to &all'
|
||||
HelpButton.DefaultCaption = False
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
|
@ -56,6 +56,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
TATypes,
|
||||
ceUtils;
|
||||
|
||||
type
|
||||
@ -124,7 +125,7 @@ end;
|
||||
|
||||
function TTitleFootEditor.GetChart: TChart;
|
||||
begin
|
||||
Result := TChartTitleAccess(FTitle).GetOwner as TChart;
|
||||
Result := (FTitle.GetOwner as TChart);
|
||||
end;
|
||||
|
||||
procedure TTitleFootEditor.OKButtonClick(Sender: TObject);
|
||||
@ -136,7 +137,7 @@ procedure TTitleFootEditor.Prepare(ATitle: TChartTitle; ACaption: String = '');
|
||||
begin
|
||||
FTitle := ATitle;
|
||||
if FSavedTitle = nil then
|
||||
FSavedTitle := TChartTitle.Create(TChart(TChartTitleAccess(FTitle).GetOwner));
|
||||
FSavedTitle := TChartTitle.Create(GetChart);
|
||||
FSavedTitle.Assign(FTitle);
|
||||
|
||||
if ACaption <> '' then
|
||||
|
@ -83,11 +83,11 @@ type
|
||||
procedure SetVisible(AValue: Boolean);
|
||||
procedure StyleChanged(Sender: TObject); virtual;
|
||||
protected
|
||||
function GetOwner: TPersistent; override;
|
||||
public
|
||||
constructor Create(AOwner: TCustomChart);
|
||||
public
|
||||
procedure Assign(ASource: TPersistent); override;
|
||||
function GetOwner: TPersistent; override;
|
||||
procedure SetOwner(AOwner: TCustomChart);
|
||||
property Visible: Boolean read FVisible write SetVisible;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user