Skip to content

Commit be278b1

Browse files
committed
Fix in editor predict
1 parent 7466b82 commit be278b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GDK.ToolsAPI.Helper.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ function TToolsApiModule.SourceEditor(const Predicate: TFunc<IOTASourceEditor, B
366366
Found := Editor(
367367
function(Editor: IOTAEditor): Boolean
368368
begin
369-
Result := (Editor.QueryInterface(IOTASourceEditor, Result) = S_OK);
369+
Result := Supports(Editor, IOTASourceEditor);
370370
end);
371371

372372
SourceEditor := Found as IOTASourceEditor;
@@ -380,7 +380,7 @@ function TToolsApiModule.FormEditor(const Predicate: TFunc<IOTAFormEditor, Boole
380380
Found := Editor(
381381
function(Editor: IOTAEditor): Boolean
382382
begin
383-
Result := (Editor.QueryInterface(IOTAFormEditor, Result) = S_OK);
383+
Result := Supports(Editor, IOTAFormEditor);
384384
end);
385385

386386
Result := Found as IOTAFormEditor;

0 commit comments

Comments
 (0)