IDE: accelerated TSourceNotebook.FindPageWithEditor

git-svn-id: trunk@26019 -
This commit is contained in:
mattias 2010-06-10 08:17:53 +00:00
parent 0fc5f38dce
commit a392fb4a51

View File

@ -6880,15 +6880,11 @@ End;
function TSourceNotebook.FindPageWithEditor(
ASourceEditor: TSourceEditor):integer;
var i:integer;
begin
Result:=PageCount-1;
while (Result>=0) do begin
with NotebookPage[Result] do
for I := 0 to ControlCount-1 do
if Controls[I]=ASourceEditor.EditorComponent then exit;
dec(Result);
end;
if ASourceEditor.EditorComponent.Parent is TPage then
Result:=TPage(ASourceEditor.EditorComponent.Parent).PageIndex
else
Result:=-1;
end;
function TSourceNotebook.FindSourceEditorWithEditorComponent(