IDE, SourceEditor: fix locking debugger, introduced in rev 28280 #4a7e55343e

git-svn-id: trunk@28283 -
This commit is contained in:
martin 2010-11-17 01:51:27 +00:00
parent 353f8f3bab
commit bcfc277639

View File

@ -228,6 +228,7 @@ type
FErrorLine: integer; FErrorLine: integer;
FErrorColumn: integer; FErrorColumn: integer;
FLineInfoNotification: TIDELineInfoNotification; FLineInfoNotification: TIDELineInfoNotification;
FInEditorChangedUpdating: Boolean;
FOnEditorChange: TNotifyEvent; FOnEditorChange: TNotifyEvent;
FVisible: Boolean; FVisible: Boolean;
@ -2337,6 +2338,8 @@ end;
constructor TSourceEditor.Create(AOwner: TComponent; AParent: TWinControl; constructor TSourceEditor.Create(AOwner: TComponent; AParent: TWinControl;
ASharedEditor: TSourceEditor = nil); ASharedEditor: TSourceEditor = nil);
Begin Begin
FInEditorChangedUpdating := False;
if ASharedEditor = nil then if ASharedEditor = nil then
FSharedValues := TSourceEditorSharedValues.Create FSharedValues := TSourceEditorSharedValues.Create
else else
@ -2374,6 +2377,12 @@ end;
destructor TSourceEditor.Destroy; destructor TSourceEditor.Destroy;
begin begin
if FInEditorChangedUpdating then begin
debugln(['***** TSourceEditor.Destroy: FInEditorChangedUpdating was true']);
DebugBoss.UnLockCommandProcessing;
FInEditorChangedUpdating := False;
end;
if (FAOwner<>nil) and (FEditor<>nil) then begin if (FAOwner<>nil) and (FEditor<>nil) then begin
UnbindEditor; UnbindEditor;
FEditor.Visible:=false; FEditor.Visible:=false;
@ -4334,10 +4343,20 @@ end;
procedure TSourceEditor.EditorChangeUpdating(ASender: TObject; AnUpdating: Boolean); procedure TSourceEditor.EditorChangeUpdating(ASender: TObject; AnUpdating: Boolean);
begin begin
If AnUpdating then If AnUpdating then begin
DebugBoss.LockCommandProcessing //if FInEditorChangedUpdating then
else // debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=True, but FInEditorChangedUpdating was true already']);
DebugBoss.UnLockCommandProcessing; if not FInEditorChangedUpdating then
DebugBoss.LockCommandProcessing;
FInEditorChangedUpdating := True;
end else
begin
//if not FInEditorChangedUpdating then
// debugln(['***** TSourceEditor.EditorChangeUpdating: Updating=False, but FInEditorChangedUpdating was false already']);
if FInEditorChangedUpdating then
DebugBoss.UnLockCommandProcessing;
FInEditorChangedUpdating := False;
end;
end; end;
Procedure TSourceEditor.EditorMouseMoved(Sender: TObject; Procedure TSourceEditor.EditorMouseMoved(Sender: TObject;