IDE: SourceEditor, fix selecting next tab when drag/drop moving an editor. The editor incorrectly switched to the 2nd next tab. Issue #40064

This commit is contained in:
Martin 2023-02-03 21:01:03 +01:00
parent a1b61028fa
commit 8b783581a0

View File

@ -7748,11 +7748,16 @@ begin
FPageIndex := APageIndex + 1
else
FPageIndex := APageIndex - 1;
if FUpdateLock = 0 then
ApplyPageIndex
else
if FUpdateLock = 0 then begin
ApplyPageIndex;
end
else begin
FNotebook.PageIndex := FPageIndex; // Avoid the WS doing this, when the page is deleted.
Include(FUpdateFlags,ufPageIndexChanged);
end;
end;
if FPageIndex > APageIndex then
dec(FPageIndex);
NotebookPages.Delete(APageIndex);
end else begin
FPageIndex := -1;