mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 03:27:32 +01:00
SourceEditor: Fix (Work-around) an issue with focusing an editor, that is being closed (while debugging) "no parent handle". Issue #0022015
git-svn-id: trunk@37623 -
This commit is contained in:
parent
f41238ce43
commit
f5beac7000
@ -480,6 +480,7 @@ type
|
||||
function IsActiveOnNoteBook: boolean;
|
||||
|
||||
// debugging
|
||||
procedure DoRequestExecutionMarks(Data: PtrInt);
|
||||
procedure FillExecutionMarks;
|
||||
procedure ClearExecutionMarks;
|
||||
procedure LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
||||
@ -2559,6 +2560,7 @@ end;
|
||||
destructor TSourceEditor.Destroy;
|
||||
begin
|
||||
DebugLnEnter(SRCED_CLOSE, ['TSourceEditor.Destroy ']);
|
||||
Application.RemoveAsyncCalls(Self);
|
||||
if FInEditorChangedUpdating then begin
|
||||
debugln(['***** TSourceEditor.Destroy: FInEditorChangedUpdating was true']);
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
@ -4980,6 +4982,11 @@ begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.DoRequestExecutionMarks(Data: PtrInt);
|
||||
begin
|
||||
DebugBoss.LineInfo.Request(FSharedValues.MarksRequestedForFile);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.FillExecutionMarks;
|
||||
var
|
||||
ASource: String;
|
||||
@ -4998,7 +5005,7 @@ begin
|
||||
FSharedValues.MarksRequested := True;
|
||||
FSharedValues.MarksRequestedForFile := ASource;
|
||||
DebugBoss.LineInfo.AddNotification(FLineInfoNotification);
|
||||
DebugBoss.LineInfo.Request(ASource);
|
||||
Application.QueueAsyncCall(@DoRequestExecutionMarks, 0);
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
@ -5046,8 +5053,10 @@ end;
|
||||
|
||||
procedure TSourceEditor.LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
||||
begin
|
||||
if ASource = FileName then
|
||||
if ASource = FileName then begin
|
||||
Application.RemoveAsyncCalls(Self);
|
||||
FillExecutionMarks;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSourceEditor.SourceToDebugLine(aLinePos: Integer): Integer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user