Browse Source

ProfilerView: bring errors pad to front only if there were errors executing the query.

pull/14/head
Daniel Grunwald 15 years ago
parent
commit
4c8a325a5e
  1. 9
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs

9
src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs

@ -106,9 +106,12 @@ namespace ICSharpCode.Profiler.AddIn.Views @@ -106,9 +106,12 @@ namespace ICSharpCode.Profiler.AddIn.Views
Dispatcher.Invoke(
(Action)(
() => {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
TaskService.ClearExceptCommentTasks();
TaskService.AddRange(errors.Select(error => new Task(null, error.ErrorText, error.Column, error.Line, (error.IsWarning) ? TaskType.Warning : TaskType.Error)));
var tasks = errors.Select(error => new Task(null, error.ErrorText, error.Column, error.Line, (error.IsWarning) ? TaskType.Warning : TaskType.Error)).ToList();
if (tasks.Count > 0) {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
TaskService.ClearExceptCommentTasks();
TaskService.AddRange(tasks);
}
}
)
);

Loading…
Cancel
Save