mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 16:21:01 +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);
|
procedure TSourceEditor.EditorChangeUpdating(ASender: TObject; AnUpdating: Boolean);
|
||||||
begin
|
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 AnUpdating then begin
|
||||||
//if FInEditorChangedUpdating then
|
//if FInEditorChangedUpdating then
|
||||||
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=True, but FInEditorChangedUpdating was true already']);
|
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=True, but FInEditorChangedUpdating was true already']);
|
||||||
if not FInEditorChangedUpdating then
|
if not FInEditorChangedUpdating then begin
|
||||||
|
FInEditorChangedUpdating := True;
|
||||||
DebugBoss.LockCommandProcessing;
|
DebugBoss.LockCommandProcessing;
|
||||||
FInEditorChangedUpdating := True;
|
end;
|
||||||
FMouseActionPopUpMenu := nil;
|
FMouseActionPopUpMenu := nil;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//if not FInEditorChangedUpdating then
|
//if not FInEditorChangedUpdating then
|
||||||
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=False, but FInEditorChangedUpdating was false already']);
|
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=False, but FInEditorChangedUpdating was false already']);
|
||||||
if FInEditorChangedUpdating then
|
if FInEditorChangedUpdating then begin
|
||||||
DebugBoss.UnLockCommandProcessing;
|
FInEditorChangedUpdating := False; // set before unlocking
|
||||||
FInEditorChangedUpdating := False;
|
DebugBoss.UnLockCommandProcessing; // may lead to recursion
|
||||||
|
end;
|
||||||
//FMouseActionPopUpMenu :=
|
//FMouseActionPopUpMenu :=
|
||||||
if (FMouseActionPopUpMenu <> nil) then begin
|
if (FMouseActionPopUpMenu <> nil) then begin
|
||||||
FMouseActionPopUpMenu.PopupComponent := FEditor;
|
FMouseActionPopUpMenu.PopupComponent := FEditor;
|
||||||
|
Loading…
Reference in New Issue
Block a user