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
Dispatcher.Invoke( Dispatcher.Invoke(
(Action)( (Action)(
() => { () => {
WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront(); var tasks = errors.Select(error => new Task(null, error.ErrorText, error.Column, error.Line, (error.IsWarning) ? TaskType.Warning : TaskType.Error)).ToList();
TaskService.ClearExceptCommentTasks(); if (tasks.Count > 0) {
TaskService.AddRange(errors.Select(error => new Task(null, error.ErrorText, error.Column, error.Line, (error.IsWarning) ? TaskType.Warning : TaskType.Error))); WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad)).BringPadToFront();
TaskService.ClearExceptCommentTasks();
TaskService.AddRange(tasks);
}
} }
) )
); );

Loading…
Cancel
Save