DBG: Ensure watches are enabled, after expression added via menu

git-svn-id: trunk@30507 -
This commit is contained in:
martin 2011-04-29 13:12:23 +00:00
parent d3cfc4ada0
commit 988bdbe88a

View File

@ -657,6 +657,7 @@ procedure TDebugManager.mnuAddWatchClicked(Sender: TObject);
var
SE: TSourceEditor;
WatchVar: String;
w: TIDEWatch;
begin
SE := SourceEditorManager.GetActiveSE;
@ -668,8 +669,12 @@ begin
WatchVar := SE.GetOperandAtCurrentCaret;
if (WatchVar <> '') and SE.EditorComponent.Focused then
begin
if (Watches.Find(WatchVar) <> nil) or (Watches.Add(WatchVar) <> nil)
w := Watches.Find(WatchVar);
if w = nil
then w := Watches.Add(WatchVar);
if (w <> nil)
then begin
w.Enabled := True;
ViewDebugDialog(ddtWatches, False);
Exit;
end;