Browse Source

Debugger tooltips work if they are hidden and then shown again

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1412 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
b19d776a51
  1. 36
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs

36
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs

@ -55,16 +55,19 @@ namespace ICSharpCode.SharpDevelop.Services
if (variable == null) throw new ArgumentNullException("variable"); if (variable == null) throw new ArgumentNullException("variable");
this.variable = variable; this.variable = variable;
this.variable.ValueChanged += Update; this.Shown += delegate {
this.Hidden += delegate { this.variable.ValueChanged -= Update; }; this.variable.ValueChanged += Update;
DoInPausedState( delegate { Update(); } );
};
this.Hidden += delegate {
this.variable.ValueChanged -= Update;
};
DebuggerGridControl.AddColumns(this.ChildColumns); DebuggerGridControl.AddColumns(this.ChildColumns);
this[1].Paint += OnIconPaint; this[1].Paint += OnIconPaint;
this[3].FinishLabelEdit += OnLabelEdited; this[3].FinishLabelEdit += OnLabelEdited;
this[3].MouseDown += OnMouseDown; this[3].MouseDown += OnMouseDown;
Update();
} }
void Update(object sender, DebuggerEventArgs e) void Update(object sender, DebuggerEventArgs e)
@ -146,16 +149,21 @@ namespace ICSharpCode.SharpDevelop.Services
protected override void OnExpanding(DynamicListEventArgs e) protected override void OnExpanding(DynamicListEventArgs e)
{ {
if (!populated) { if (!populated) {
if (Variable.Debugger.IsPaused) { DoInPausedState(delegate { Populate(); });
Populate(); }
} else { }
EventHandler<DebuggingPausedEventArgs> populate = null;
populate = delegate { void DoInPausedState(MethodInvoker action)
Populate(); {
Variable.Debugger.DebuggingPaused -= populate; if (Variable.Debugger.IsPaused) {
}; action();
Variable.Debugger.DebuggingPaused += populate; } else {
} EventHandler<DebuggingPausedEventArgs> onDebuggingPaused = null;
onDebuggingPaused = delegate {
action();
Variable.Debugger.DebuggingPaused -= onDebuggingPaused;
};
Variable.Debugger.DebuggingPaused += onDebuggingPaused;
} }
} }

Loading…
Cancel
Save