mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 21:59:18 +02:00
Replace locally implement operator overload for method comparison by already available SameMethod. Proposed by n7800 in MR !431
This commit is contained in:
parent
48e844f7f6
commit
4e939b31dd
@ -301,7 +301,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LResources, Math, PropEdits,
|
LResources, Math, LazMethodList, PropEdits,
|
||||||
TAChartStrConsts, TAGeometry, TAMath;
|
TAChartStrConsts, TAGeometry, TAMath;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -1182,14 +1182,14 @@ end;
|
|||||||
|
|
||||||
procedure TChartAxis.SetOnGetMarkText(AValue: TChartGetAxisMarkTextEvent);
|
procedure TChartAxis.SetOnGetMarkText(AValue: TChartGetAxisMarkTextEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetMarkText) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetMarkText), TMethod(AValue)) then exit;
|
||||||
FOnGetMarkText := AValue;
|
FOnGetMarkText := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartAxis.SetOnMarkToText(AValue: TChartAxisMarkToTextEvent);
|
procedure TChartAxis.SetOnMarkToText(AValue: TChartAxisMarkToTextEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnMarkToText) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnMarkToText), TMethod(AValue)) then exit;
|
||||||
FOnMarkToText := AValue;
|
FOnMarkToText := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
@ -31,7 +31,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Controls, SysUtils, Types, Math,
|
Classes, Controls, SysUtils, Types, Math,
|
||||||
StdCtrls, Graphics, LCLIntf, LCLType, Themes,
|
StdCtrls, Graphics, LCLIntf, LCLType, LazMethodList, Themes,
|
||||||
IntegerList, LazUTF8,
|
IntegerList, LazUTF8,
|
||||||
TAChartUtils, TACustomSeries, TALegend, TAGraph,
|
TAChartUtils, TACustomSeries, TALegend, TAGraph,
|
||||||
TACustomSource, TADrawerCanvas, TADrawUtils, TAEnumerators, TAGeometry;
|
TACustomSource, TADrawerCanvas, TADrawUtils, TAEnumerators, TAGeometry;
|
||||||
@ -732,14 +732,14 @@ end;
|
|||||||
|
|
||||||
procedure TChartListbox.SetOnAddSeries(AValue: TChartListboxAddSeriesEvent);
|
procedure TChartListbox.SetOnAddSeries(AValue: TChartListboxAddSeriesEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAddSeries) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAddSeries), TMethod(AValue)) then exit;
|
||||||
FOnAddSeries := AValue;
|
FOnAddSeries := AValue;
|
||||||
Populate;
|
Populate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartListbox.SetOnPopulate(AValue: TNotifyEvent);
|
procedure TChartListbox.SetOnPopulate(AValue: TNotifyEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnPopulate) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnPopulate), TMethod(AValue)) then exit;
|
||||||
FOnPopulate := AValue;
|
FOnPopulate := AValue;
|
||||||
Populate;
|
Populate;
|
||||||
end;
|
end;
|
||||||
|
@ -397,8 +397,6 @@ procedure UpdateMinMax(AValue: Integer; var AMin, AMax: Integer); overload;
|
|||||||
|
|
||||||
function WeightedAverage(AX1, AX2, ACoeff: Double): Double; inline;
|
function WeightedAverage(AX1, AX2, ACoeff: Double): Double; inline;
|
||||||
|
|
||||||
operator =(const A, B: TMethod): Boolean; overload; inline;
|
|
||||||
|
|
||||||
var
|
var
|
||||||
DrawData: TDrawDataRegistry;
|
DrawData: TDrawDataRegistry;
|
||||||
ShowMessageProc: TShowMessageProc;
|
ShowMessageProc: TShowMessageProc;
|
||||||
@ -407,7 +405,7 @@ var
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
StrUtils, TypInfo, TAChartStrConsts;
|
StrUtils, TypInfo, LazMethodList, TAChartStrConsts;
|
||||||
|
|
||||||
function BoundsSize(ALeft, ATop: Integer; ASize: TSize): TRect; inline;
|
function BoundsSize(ALeft, ATop: Integer; ASize: TSize): TRect; inline;
|
||||||
begin
|
begin
|
||||||
@ -682,10 +680,6 @@ begin
|
|||||||
Result := AX1 * (1 - ACoeff) + AX2 * ACoeff;
|
Result := AX1 * (1 - ACoeff) + AX2 * ACoeff;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
operator = (const A, B: TMethod): Boolean;
|
|
||||||
begin
|
|
||||||
Result := (A.Code = B.Code) and (A.Data = B.Data);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ THistory }
|
{ THistory }
|
||||||
|
|
||||||
@ -870,7 +864,7 @@ end;
|
|||||||
|
|
||||||
procedure TIntervalList.SetOnChange(AValue: TNotifyEvent);
|
procedure TIntervalList.SetOnChange(AValue: TNotifyEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnChange) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnChange), TMethod(AValue)) then exit;
|
||||||
FOnChange := AValue;
|
FOnChange := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, PropEdits, StrUtils, LResources, Types, GraphUtil,
|
Math, PropEdits, StrUtils, LResources, LazMethodList, Types, GraphUtil,
|
||||||
TAChartStrConsts, TAGeometry, TAMath;
|
TAChartStrConsts, TAGeometry, TAMath;
|
||||||
|
|
||||||
function CreateLazIntfImage(
|
function CreateLazIntfImage(
|
||||||
@ -1118,14 +1118,14 @@ end;
|
|||||||
|
|
||||||
procedure TChartSeries.SetOnGetMark(AValue: TChartGetMarkEvent);
|
procedure TChartSeries.SetOnGetMark(AValue: TChartGetMarkEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetMark) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetMark), TMethod(AValue)) then exit;
|
||||||
FOnGetMark := AValue;
|
FOnGetMark := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartSeries.SetOnGetMarkText(AValue: TChartGetMarkTextEvent);
|
procedure TChartSeries.SetOnGetMarkText(AValue: TChartGetMarkTextEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetMarkText) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetMarkText), TMethod(AValue)) then exit;
|
||||||
FOnGetMarkText := AValue;
|
FOnGetMarkText := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
@ -82,7 +82,7 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, SysUtils, DateUtils, TAMath;
|
Math, SysUtils, DateUtils, LazMethodList, TAMath;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ end;
|
|||||||
|
|
||||||
procedure TDbChartSource.SetOnGetItem(AValue: TDbChartSourceGetItemEvent);
|
procedure TDbChartSource.SetOnGetItem(AValue: TDbChartSourceGetItemEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetItem) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetItem), TMethod(AValue)) then exit;
|
||||||
FOnGetItem := AValue;
|
FOnGetItem := AValue;
|
||||||
Reset;
|
Reset;
|
||||||
end;
|
end;
|
||||||
|
@ -499,7 +499,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
ipf,
|
ipf,
|
||||||
GraphType, GraphUtil, Math, spe, StrUtils, SysUtils,
|
GraphType, GraphUtil, Math, spe, StrUtils, SysUtils, LazMethodList,
|
||||||
TAChartStrConsts, TAGeometry, TAGraph, TAMath;
|
TAChartStrConsts, TAGeometry, TAGraph, TAMath;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -776,7 +776,7 @@ end;
|
|||||||
|
|
||||||
procedure TFuncSeries.SetOnCalculate(AValue: TFuncCalculateEvent);
|
procedure TFuncSeries.SetOnCalculate(AValue: TFuncCalculateEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCalculate) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCalculate), TMethod(AValue)) then exit;
|
||||||
FOnCalculate := AValue;
|
FOnCalculate := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
@ -897,7 +897,7 @@ end;
|
|||||||
procedure TParametricCurveSeries.SetOnCalculate(
|
procedure TParametricCurveSeries.SetOnCalculate(
|
||||||
AValue: TParametricCurveCalculateEvent);
|
AValue: TParametricCurveCalculateEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCalculate) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCalculate), TMethod(AValue)) then exit;
|
||||||
FOnCalculate := AValue;
|
FOnCalculate := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
@ -2879,7 +2879,7 @@ end;
|
|||||||
|
|
||||||
procedure TColorMapSeries.SetOnCalculate(AValue: TFuncCalculate3DEvent);
|
procedure TColorMapSeries.SetOnCalculate(AValue: TFuncCalculate3DEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCalculate) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCalculate), TMethod(AValue)) then exit;
|
||||||
FOnCalculate := AValue;
|
FOnCalculate := AValue;
|
||||||
InvalidateBufferImage;
|
InvalidateBufferImage;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
|
@ -525,7 +525,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Math, Types,
|
Math, Types,
|
||||||
Clipbrd, Dialogs, LResources,
|
Clipbrd, Dialogs, LResources, LazMethodList,
|
||||||
TADrawerCanvas, TAGeometry, TAMath, TAStyles;
|
TADrawerCanvas, TAGeometry, TAMath, TAStyles;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -1835,77 +1835,77 @@ end;
|
|||||||
|
|
||||||
procedure TChart.SetOnAfterDraw(AValue: TChartDrawEvent);
|
procedure TChart.SetOnAfterDraw(AValue: TChartDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAfterDraw) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAfterDraw), TMethod(AValue)) then exit;
|
||||||
FOnAfterDraw := AValue;
|
FOnAfterDraw := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnAfterCustomDrawBackground(AValue: TChartAfterCustomDrawEvent);
|
procedure TChart.SetOnAfterCustomDrawBackground(AValue: TChartAfterCustomDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAfterCustomDrawBackground) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAfterCustomDrawBackground), TMethod(AValue)) then exit;
|
||||||
FOnAfterCustomDrawBackground := AValue;
|
FOnAfterCustomDrawBackground := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnAfterCustomDrawBackWall(AValue: TChartAfterCustomDrawEvent);
|
procedure TChart.SetOnAfterCustomDrawBackWall(AValue: TChartAfterCustomDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAfterCustomDrawBackWall) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAfterCustomDrawBackWall), TMethod(AValue)) then exit;
|
||||||
FOnAfterCustomDrawBackWall := AValue;
|
FOnAfterCustomDrawBackWall := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnAfterDrawBackground(AValue: TChartAfterDrawEvent);
|
procedure TChart.SetOnAfterDrawBackground(AValue: TChartAfterDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAfterDrawBackground) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAfterDrawBackground), TMethod(AValue)) then exit;
|
||||||
FOnAfterDrawBackground := AValue;
|
FOnAfterDrawBackground := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnAfterDrawBackWall(AValue: TChartAfterDrawEvent);
|
procedure TChart.SetOnAfterDrawBackWall(AValue: TChartAfterDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAfterDrawBackWall) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAfterDrawBackWall), TMethod(AValue)) then exit;
|
||||||
FOnAfterDrawBackWall := AValue;
|
FOnAfterDrawBackWall := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnBeforeCustomDrawBackground(AValue: TChartBeforeCustomDrawEvent);
|
procedure TChart.SetOnBeforeCustomDrawBackground(AValue: TChartBeforeCustomDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnBeforeCustomDrawBackground) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnBeforeCustomDrawBackground), TMethod(AValue)) then exit;
|
||||||
FOnBeforeCustomDrawBackground := AValue;
|
FOnBeforeCustomDrawBackground := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnBeforeCustomDrawBackWall(AValue: TChartBeforeCustomDrawEvent);
|
procedure TChart.SetOnBeforeCustomDrawBackWall(AValue: TChartBeforeCustomDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnBeforeCustomDrawBackWall) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnBeforeCustomDrawBackWall), TMethod(AValue)) then exit;
|
||||||
FOnBeforeCustomDrawBackWall := AValue;
|
FOnBeforeCustomDrawBackWall := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnBeforeDrawBackground(AValue: TChartBeforeDrawEvent);
|
procedure TChart.SetOnBeforeDrawBackground(AValue: TChartBeforeDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnBeforeDrawBackground) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnBeforeDrawBackground), TMethod(AValue)) then exit;
|
||||||
FOnBeforeDrawBackground := AValue;
|
FOnBeforeDrawBackground := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnBeforeDrawBackWall(AValue: TChartBeforeDrawEvent);
|
procedure TChart.SetOnBeforeDrawBackWall(AValue: TChartBeforeDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnBeforeDrawBackWall) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnBeforeDrawBackWall), TMethod(AValue)) then exit;
|
||||||
FOnBeforeDrawBackWall := AValue;
|
FOnBeforeDrawBackWall := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnChartPaint(AValue: TChartPaintEvent);
|
procedure TChart.SetOnChartPaint(AValue: TChartPaintEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnChartPaint) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnChartPaint), TMethod(AValue)) then exit;
|
||||||
FOnChartPaint := AValue;
|
FOnChartPaint := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.SetOnDrawLegend(AValue: TChartDrawLegendEvent);
|
procedure TChart.SetOnDrawLegend(AValue: TChartDrawLegendEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnDrawLegend) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnDrawLegend), TMethod(AValue)) then exit;
|
||||||
FOnDrawLegend := AValue;
|
FOnDrawLegend := AValue;
|
||||||
StyleChanged(self);
|
StyleChanged(self);
|
||||||
end;
|
end;
|
||||||
|
@ -339,7 +339,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, PropEdits, Types, LResources,
|
Math, PropEdits, Types, LResources, LazMethodList,
|
||||||
TADrawerCanvas, TAGeometry;
|
TADrawerCanvas, TAGeometry;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -1206,14 +1206,14 @@ end;
|
|||||||
|
|
||||||
procedure TChartSeriesLegend.SetOnDraw(AValue: TLegendItemDrawEvent);
|
procedure TChartSeriesLegend.SetOnDraw(AValue: TLegendItemDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnDraw) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnDraw), TMethod(AValue)) then exit;
|
||||||
FOnDraw := AValue;
|
FOnDraw := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartSeriesLegend.SetOnCreate(AValue: TLegendItemCreateEvent);
|
procedure TChartSeriesLegend.SetOnCreate(AValue: TLegendItemCreateEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCreate) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCreate), TMethod(AValue)) then exit;
|
||||||
FOnCreate := AValue;
|
FOnCreate := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
@ -220,7 +220,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math,
|
Math, LazMethodList,
|
||||||
TAChartStrConsts, TATypes, TACustomSource, TAGeometry, TAGraph;
|
TAChartStrConsts, TATypes, TACustomSource, TAGeometry, TAGraph;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -901,7 +901,7 @@ end;
|
|||||||
|
|
||||||
procedure TCustomPieSeries.SetOnCustomDrawPie(AValue: TCustomDrawPieEvent);
|
procedure TCustomPieSeries.SetOnCustomDrawPie(AValue: TCustomDrawPieEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCustomDrawPie) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCustomDrawPie), TMethod(AValue)) then exit;
|
||||||
FOnCustomDrawPie := AValue;
|
FOnCustomDrawPie := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
@ -410,7 +410,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{GraphMath,} GraphType, IntfGraphics, LResources, Math, PropEdits, SysUtils,
|
GraphType, IntfGraphics, LResources, LazMethodList, Math, PropEdits, SysUtils,
|
||||||
TAChartStrConsts, TADrawerCanvas, TAGeometry, TACustomSource, TAGraph,
|
TAChartStrConsts, TADrawerCanvas, TAGeometry, TACustomSource, TAGraph,
|
||||||
TAMath, TAStyles;
|
TAMath, TAStyles;
|
||||||
|
|
||||||
@ -1898,14 +1898,14 @@ end;
|
|||||||
|
|
||||||
procedure TBarSeries.SetOnBeforeDrawBar(AValue: TBeforeDrawBarEvent);
|
procedure TBarSeries.SetOnBeforeDrawBar(AValue: TBeforeDrawBarEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnBeforeDrawBar) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnBeforeDrawBar), TMethod(AValue)) then exit;
|
||||||
FOnBeforeDrawBar := AValue;
|
FOnBeforeDrawBar := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBarSeries.SetOnCustomDrawBar(AValue: TCustomDrawBarEvent);
|
procedure TBarSeries.SetOnCustomDrawBar(AValue: TCustomDrawBarEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnCustomDrawBar) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnCustomDrawBar), TMethod(AValue)) then exit;
|
||||||
FOnCustomDrawBar := AValue;
|
FOnCustomDrawBar := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
@ -2520,14 +2520,14 @@ end;
|
|||||||
|
|
||||||
procedure TUserDrawnSeries.SetOnDraw(AValue: TSeriesDrawEvent);
|
procedure TUserDrawnSeries.SetOnDraw(AValue: TSeriesDrawEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnDraw) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnDraw), TMethod(AValue)) then exit;
|
||||||
FOnDraw := AValue;
|
FOnDraw := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUserDrawnSeries.SetOnGetBounds(AValue: TSeriesGetBoundsEvent);
|
procedure TUserDrawnSeries.SetOnGetBounds(AValue: TSeriesGetBoundsEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetBounds) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetBounds), TMethod(AValue)) then exit;
|
||||||
FOnGetBounds := AValue;
|
FOnGetBounds := AValue;
|
||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
@ -304,7 +304,7 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, StrUtils, SysUtils, TAMath, TAChartStrConsts;
|
Math, StrUtils, SysUtils, LazMethodList, TAMath, TAChartStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCustomChartSourceAccess = class(TCustomChartSource);
|
TCustomChartSourceAccess = class(TCustomChartSource);
|
||||||
@ -1485,7 +1485,7 @@ end;
|
|||||||
procedure TUserDefinedChartSource.SetOnGetChartDataItem(
|
procedure TUserDefinedChartSource.SetOnGetChartDataItem(
|
||||||
AValue: TGetChartDataItemEvent);
|
AValue: TGetChartDataItemEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetChartDataItem) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetChartDataItem), TMethod(AValue)) then exit;
|
||||||
FOnGetChartDataItem := AValue;
|
FOnGetChartDataItem := AValue;
|
||||||
Reset;
|
Reset;
|
||||||
end;
|
end;
|
||||||
|
@ -15,7 +15,7 @@ unit TATextElements;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Graphics, Types,
|
Classes, Graphics, Types, LazMethodList,
|
||||||
TAChartUtils, TADrawUtils, TATypes,
|
TAChartUtils, TADrawUtils, TATypes,
|
||||||
|
|
||||||
// Workaround for issue #22850.
|
// Workaround for issue #22850.
|
||||||
@ -585,7 +585,7 @@ end;
|
|||||||
|
|
||||||
procedure TChartTextElement.SetOnGetShape(AValue: TChartGetShapeEvent);
|
procedure TChartTextElement.SetOnGetShape(AValue: TChartGetShapeEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGetShape) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGetShape), TMethod(AValue)) then exit;
|
||||||
FOnGetShape := AValue;
|
FOnGetShape := AValue;
|
||||||
StyleChanged(Self);
|
StyleChanged(Self);
|
||||||
end;
|
end;
|
||||||
|
@ -202,7 +202,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ComponentEditors, Forms, Math, PropEdits,
|
ComponentEditors, Forms, Math, LazMethodList, PropEdits,
|
||||||
TAChartStrConsts, TAMath, TASubcomponentsEditor;
|
TAChartStrConsts, TAMath, TASubcomponentsEditor;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -797,14 +797,14 @@ end;
|
|||||||
|
|
||||||
procedure TUserDefinedAxisTransform.SetOnAxisToGraph(AValue: TTransformEvent);
|
procedure TUserDefinedAxisTransform.SetOnAxisToGraph(AValue: TTransformEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnAxisToGraph) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnAxisToGraph), TMethod(AValue)) then exit;
|
||||||
FOnAxisToGraph := AValue;
|
FOnAxisToGraph := AValue;
|
||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUserDefinedAxisTransform.SetOnGraphToAxis(AValue: TTransformEvent);
|
procedure TUserDefinedAxisTransform.SetOnGraphToAxis(AValue: TTransformEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(FOnGraphToAxis) = TMethod(AValue) then exit;
|
if SameMethod(TMethod(FOnGraphToAxis), TMethod(AValue)) then exit;
|
||||||
FOnGraphToAxis := AValue;
|
FOnGraphToAxis := AValue;
|
||||||
Changed;
|
Changed;
|
||||||
end;
|
end;
|
||||||
|
@ -422,7 +422,8 @@ procedure Register;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses WSShellCtrls
|
uses
|
||||||
|
WSShellCtrls, LazMethodList
|
||||||
{$ifdef windows}
|
{$ifdef windows}
|
||||||
,Windows, ShellApi
|
,Windows, ShellApi
|
||||||
{$endif};
|
{$endif};
|
||||||
@ -465,10 +466,6 @@ begin
|
|||||||
Result := Format(sShellCtrlsGB, [Format('%.1n', [AFileSize / ONE_GB])]);
|
Result := Format(sShellCtrlsGB, [Format('%.1n', [AFileSize / ONE_GB])]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
operator = (const A, B: TMethod): Boolean;
|
|
||||||
begin
|
|
||||||
Result := (A.Code = B.Code) and (A.Data = B.Data);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TShellListItem }
|
{ TShellListItem }
|
||||||
|
|
||||||
@ -701,7 +698,7 @@ var
|
|||||||
RootNode: TTreeNode;
|
RootNode: TTreeNode;
|
||||||
CurrPath: String;
|
CurrPath: String;
|
||||||
begin
|
begin
|
||||||
if TMethod(AValue) = TMethod(FOnSortCompare) then
|
if SameMethod(TMethod(AValue), TMethod(FOnSortCompare)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
FOnSortCompare := AValue;
|
FOnSortCompare := AValue;
|
||||||
@ -1776,7 +1773,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomShellListView.SetOnSortCompare(AValue: TFileItemCompareEvent);
|
procedure TCustomShellListView.SetOnSortCompare(AValue: TFileItemCompareEvent);
|
||||||
begin
|
begin
|
||||||
if TMethod(AValue) = TMethod(FOnSortCompare) then Exit;
|
if SameMethod(TMethod(AValue), TMethod(FOnSortCompare)) then
|
||||||
|
Exit;
|
||||||
FOnSortCompare:=AValue;
|
FOnSortCompare:=AValue;
|
||||||
Clear;
|
Clear;
|
||||||
Items.Clear;
|
Items.Clear;
|
||||||
|
Loading…
Reference in New Issue
Block a user