From 2cecc822e357b3cbdfc2d00e88dab3b303281f3e Mon Sep 17 00:00:00 2001 From: Roland Bengtsson Date: Sat, 7 Dec 2024 21:05:52 +0200 Subject: [PATCH] ObjectList.GetEvaluator now tries to get system/evaluator from objects #20 --- Source/BoldSystem.pas | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/BoldSystem.pas b/Source/BoldSystem.pas index 869d77b..5a903b3 100644 --- a/Source/BoldSystem.pas +++ b/Source/BoldSystem.pas @@ -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; @@ -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