mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:55:58 +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]);
|
DebugLnEnter(SRCED_PAGES, ['>> TSourceNotebook.SetPageIndex Cur-PgIdx=', PageIndex, ' FPageIndex=', FPageIndex, ' Value=', AValue, ' FUpdateLock=', FUpdateLock]);
|
||||||
FPageIndex := AValue;
|
FPageIndex := AValue;
|
||||||
if FUpdateLock = 0 then begin
|
if FUpdateLock = 0 then begin
|
||||||
|
DebugBoss.LockCommandProcessing;
|
||||||
|
try
|
||||||
FPageIndex := Max(0, Min(FPageIndex, FNotebook.PageCount-1));
|
FPageIndex := Max(0, Min(FPageIndex, FNotebook.PageCount-1));
|
||||||
if Assigned(Manager) and (FNotebook.PageIndex = FPageIndex) then
|
if Assigned(Manager) and (FNotebook.PageIndex = FPageIndex) then
|
||||||
DoActiveEditorChanged;
|
DoActiveEditorChanged;
|
||||||
@ -5915,6 +5917,9 @@ begin
|
|||||||
if snNotbookPageChangedNeeded in States then
|
if snNotbookPageChangedNeeded in States then
|
||||||
NotebookPageChanged(nil);
|
NotebookPageChanged(nil);
|
||||||
HistorySetMostRecent(FNotebook.Pages[FPageIndex]);
|
HistorySetMostRecent(FNotebook.Pages[FPageIndex]);
|
||||||
|
finally
|
||||||
|
DebugBoss.UnLockCommandProcessing;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.SetPageIndex ']);
|
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.SetPageIndex ']);
|
||||||
end;
|
end;
|
||||||
@ -7467,6 +7472,8 @@ Begin
|
|||||||
end;
|
end;
|
||||||
DebugLnEnter(SRCED_PAGES, ['>> TSourceNotebook.NotebookPageChanged PageIndex=', PageIndex, ' AutoFocusLock=', fAutoFocusLock]);
|
DebugLnEnter(SRCED_PAGES, ['>> TSourceNotebook.NotebookPageChanged PageIndex=', PageIndex, ' AutoFocusLock=', fAutoFocusLock]);
|
||||||
|
|
||||||
|
DebugBoss.LockCommandProcessing;
|
||||||
|
try
|
||||||
Exclude(States, snNotbookPageChangedNeeded);
|
Exclude(States, snNotbookPageChangedNeeded);
|
||||||
TempEditor:=GetActiveSE;
|
TempEditor:=GetActiveSE;
|
||||||
if (FHintWindow <> nil) and FHintWindow.Visible then
|
if (FHintWindow <> nil) and FHintWindow.Visible then
|
||||||
@ -7505,6 +7512,9 @@ Begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
CheckCurrentCodeBufferChanged;
|
CheckCurrentCodeBufferChanged;
|
||||||
|
finally
|
||||||
|
DebugBoss.UnLockCommandProcessing;
|
||||||
|
end;
|
||||||
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.NotebookPageChanged ']);
|
DebugLnExit(SRCED_PAGES, ['<< TSourceNotebook.NotebookPageChanged ']);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user