mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 02:16:48 +02:00
DBG: Ensure watches are enabled, after expression added via menu
git-svn-id: trunk@30507 -
This commit is contained in:
parent
d3cfc4ada0
commit
988bdbe88a
@ -657,6 +657,7 @@ procedure TDebugManager.mnuAddWatchClicked(Sender: TObject);
|
|||||||
var
|
var
|
||||||
SE: TSourceEditor;
|
SE: TSourceEditor;
|
||||||
WatchVar: String;
|
WatchVar: String;
|
||||||
|
w: TIDEWatch;
|
||||||
begin
|
begin
|
||||||
SE := SourceEditorManager.GetActiveSE;
|
SE := SourceEditorManager.GetActiveSE;
|
||||||
|
|
||||||
@ -668,8 +669,12 @@ begin
|
|||||||
WatchVar := SE.GetOperandAtCurrentCaret;
|
WatchVar := SE.GetOperandAtCurrentCaret;
|
||||||
if (WatchVar <> '') and SE.EditorComponent.Focused then
|
if (WatchVar <> '') and SE.EditorComponent.Focused then
|
||||||
begin
|
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
|
then begin
|
||||||
|
w.Enabled := True;
|
||||||
ViewDebugDialog(ddtWatches, False);
|
ViewDebugDialog(ddtWatches, False);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user