Skip to content

Commit

Permalink
ObjectList.GetEvaluator now tries to get system/evaluator from objects
Browse files Browse the repository at this point in the history
  • Loading branch information
bero committed Dec 7, 2024
1 parent 0b52cef commit 2cecc82
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/BoldSystem.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ TBoldObjectList = class(TBoldList)
function GetFreeStandingClass: TBoldFreeStandingElementClass; override;
function IncludesElement(Item: TBoldElement): Boolean; override;
function IndexOfElement(Item: TBoldElement): Integer; override;
function GetEvaluator: TBoldEvaluator; override;
procedure Initialize; override;
procedure InsertElement(index: Integer; Element: TBoldElement); override;
procedure SetElement(index: Integer; Value: TBoldElement); override;
Expand Down Expand Up @@ -8297,6 +8298,18 @@ procedure TBoldObjectList.FreeData;
begin
end;

function TBoldObjectList.GetEvaluator: TBoldEvaluator;
begin
result := nil;
if IsPartOfSystem then
result := BoldSystem.Evaluator
else
if not Empty then
result := Locators[0].BoldSystem.Evaluator
else
result := inherited GetEvaluator;
end;

function TBoldObjectList.ObserverMayModify(Observer: TObject): Boolean;
begin
result := inherited ObserverMayModify(Observer) and
Expand Down

0 comments on commit 2cecc82

Please sign in to comment.