mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 11:18:21 +02:00
SourceEditor: Fix an issue with focusing an editor, that is being closed (while debugging) "no parent handle". Issue #0022015
git-svn-id: trunk@37471 -
This commit is contained in:
parent
987fd9b767
commit
204877981e
@ -5906,6 +5906,8 @@ begin
|
||||
DebugLnEnter(SRCED_PAGES, ['>> TSourceNotebook.SetPageIndex Cur-PgIdx=', PageIndex, ' FPageIndex=', FPageIndex, ' Value=', AValue, ' FUpdateLock=', FUpdateLock]);
|
||||
FPageIndex := AValue;
|
||||
if FUpdateLock = 0 then begin
|
||||
DebugBoss.LockCommandProcessing;
|
||||
try
|
||||
FPageIndex := Max(0, Min(FPageIndex, FNotebook.PageCount-1));
|
||||
if Assigned(Manager) and (FNotebook.PageIndex = FPageIndex) then
|
||||
DoActiveEditorChanged;
|
||||
@ -5915,6 +5917,9 @@ begin
|
||||
if snNotbookPageChangedNeeded in States then
|
||||
NotebookPageChanged(nil);
|
||||
HistorySetMostRecent(FNotebook.Pages[FPageIndex]);
|
||||
finally
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
end;
|
||||
end;
|
||||
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.SetPageIndex ']);
|
||||
end;
|
||||
@ -7467,6 +7472,8 @@ Begin
|
||||
end;
|
||||
DebugLnEnter(SRCED_PAGES, ['>> TSourceNotebook.NotebookPageChanged PageIndex=', PageIndex, ' AutoFocusLock=', fAutoFocusLock]);
|
||||
|
||||
DebugBoss.LockCommandProcessing;
|
||||
try
|
||||
Exclude(States, snNotbookPageChangedNeeded);
|
||||
TempEditor:=GetActiveSE;
|
||||
if (FHintWindow <> nil) and FHintWindow.Visible then
|
||||
@ -7505,6 +7512,9 @@ Begin
|
||||
end;
|
||||
|
||||
CheckCurrentCodeBufferChanged;
|
||||
finally
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
end;
|
||||
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.NotebookPageChanged ']);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user