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. 5
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs

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

Loading…
Cancel
Save