SourceEditor: Fixed closing tabs in multi-editor mode. FindPageWithEditor returned wrong results since rev 26019 #a392fb4a51

git-svn-id: trunk@26158 -
This commit is contained in:
martin 2010-06-17 13:00:50 +00:00
parent 44c32e038c
commit 6e5c9ebf1c

View File

@ -6847,7 +6847,9 @@ End;
function TSourceNotebook.FindPageWithEditor(
ASourceEditor: TSourceEditor):integer;
begin
if ASourceEditor.EditorComponent.Parent is TPage then
if (ASourceEditor.EditorComponent.Parent is TPage) and
(TPage(ASourceEditor.EditorComponent.Parent).Parent = FNotebook)
then
Result:=TPage(ASourceEditor.EditorComponent.Parent).PageIndex
else
Result:=-1;