mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 04:21:00 +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;
|
function IsActiveOnNoteBook: boolean;
|
||||||
|
|
||||||
// debugging
|
// debugging
|
||||||
|
procedure DoRequestExecutionMarks(Data: PtrInt);
|
||||||
procedure FillExecutionMarks;
|
procedure FillExecutionMarks;
|
||||||
procedure ClearExecutionMarks;
|
procedure ClearExecutionMarks;
|
||||||
procedure LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
procedure LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
||||||
@ -2559,6 +2560,7 @@ end;
|
|||||||
destructor TSourceEditor.Destroy;
|
destructor TSourceEditor.Destroy;
|
||||||
begin
|
begin
|
||||||
DebugLnEnter(SRCED_CLOSE, ['TSourceEditor.Destroy ']);
|
DebugLnEnter(SRCED_CLOSE, ['TSourceEditor.Destroy ']);
|
||||||
|
Application.RemoveAsyncCalls(Self);
|
||||||
if FInEditorChangedUpdating then begin
|
if FInEditorChangedUpdating then begin
|
||||||
debugln(['***** TSourceEditor.Destroy: FInEditorChangedUpdating was true']);
|
debugln(['***** TSourceEditor.Destroy: FInEditorChangedUpdating was true']);
|
||||||
DebugBoss.UnLockCommandProcessing;
|
DebugBoss.UnLockCommandProcessing;
|
||||||
@ -4980,6 +4982,11 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSourceEditor.DoRequestExecutionMarks(Data: PtrInt);
|
||||||
|
begin
|
||||||
|
DebugBoss.LineInfo.Request(FSharedValues.MarksRequestedForFile);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSourceEditor.FillExecutionMarks;
|
procedure TSourceEditor.FillExecutionMarks;
|
||||||
var
|
var
|
||||||
ASource: String;
|
ASource: String;
|
||||||
@ -4998,7 +5005,7 @@ begin
|
|||||||
FSharedValues.MarksRequested := True;
|
FSharedValues.MarksRequested := True;
|
||||||
FSharedValues.MarksRequestedForFile := ASource;
|
FSharedValues.MarksRequestedForFile := ASource;
|
||||||
DebugBoss.LineInfo.AddNotification(FLineInfoNotification);
|
DebugBoss.LineInfo.AddNotification(FLineInfoNotification);
|
||||||
DebugBoss.LineInfo.Request(ASource);
|
Application.QueueAsyncCall(@DoRequestExecutionMarks, 0);
|
||||||
end;
|
end;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
@ -5046,8 +5053,10 @@ end;
|
|||||||
|
|
||||||
procedure TSourceEditor.LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
procedure TSourceEditor.LineInfoNotificationChange(const ASender: TObject; const ASource: String);
|
||||||
begin
|
begin
|
||||||
if ASource = FileName then
|
if ASource = FileName then begin
|
||||||
|
Application.RemoveAsyncCalls(Self);
|
||||||
FillExecutionMarks;
|
FillExecutionMarks;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceEditor.SourceToDebugLine(aLinePos: Integer): Integer;
|
function TSourceEditor.SourceToDebugLine(aLinePos: Integer): Integer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user