mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 06:09:30 +02:00
IDE, Debugger: Fix Debugger locking in SourceEdit (protect SynEdit during Paintlock). Calls were unbalanced if method was recursively invoked.
git-svn-id: trunk@42734 -
This commit is contained in:
parent
ba9964e386
commit
f45491edd7
@ -4974,20 +4974,23 @@ end;
|
||||
|
||||
procedure TSourceEditor.EditorChangeUpdating(ASender: TObject; AnUpdating: Boolean);
|
||||
begin
|
||||
// Calls may be unbalanced, because the event handler may not be assigned to the event on the first BeginUpdate
|
||||
If AnUpdating then begin
|
||||
//if FInEditorChangedUpdating then
|
||||
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=True, but FInEditorChangedUpdating was true already']);
|
||||
if not FInEditorChangedUpdating then
|
||||
if not FInEditorChangedUpdating then begin
|
||||
FInEditorChangedUpdating := True;
|
||||
DebugBoss.LockCommandProcessing;
|
||||
FInEditorChangedUpdating := True;
|
||||
end;
|
||||
FMouseActionPopUpMenu := nil;
|
||||
end else
|
||||
begin
|
||||
//if not FInEditorChangedUpdating then
|
||||
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=False, but FInEditorChangedUpdating was false already']);
|
||||
if FInEditorChangedUpdating then
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
FInEditorChangedUpdating := False;
|
||||
if FInEditorChangedUpdating then begin
|
||||
FInEditorChangedUpdating := False; // set before unlocking
|
||||
DebugBoss.UnLockCommandProcessing; // may lead to recursion
|
||||
end;
|
||||
//FMouseActionPopUpMenu :=
|
||||
if (FMouseActionPopUpMenu <> nil) then begin
|
||||
FMouseActionPopUpMenu.PopupComponent := FEditor;
|
||||
|
Loading…
Reference in New Issue
Block a user