Skip to content

Commit

Permalink
Fixed so that error window is cleared between runs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersMalmgren committed Feb 10, 2014
1 parent 36feb8d commit ed1e5d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion FreePIE.GUI/Views/Script/Output/ErrorViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;
using FreePIE.Core.Common.Events;
using FreePIE.Core.Model.Events;
using FreePIE.GUI.Events;
using FreePIE.GUI.Views.Main;

namespace FreePIE.GUI.Views.Script.Output
{
public class ErrorViewModel : PanelViewModel, IHandle<ScriptErrorEvent>
public class ErrorViewModel : PanelViewModel, IHandle<ScriptErrorEvent>, IHandle<ScriptStateChangedEvent>
{
public ErrorViewModel(IEventAggregator eventAggregator)
{
Expand Down Expand Up @@ -44,5 +45,13 @@ public void Handle(ScriptErrorEvent message)

IsActive = true;
}

public void Handle(ScriptStateChangedEvent message)
{
if (message.Running)
{
Text = null;
}
}
}
}

0 comments on commit ed1e5d3

Please sign in to comment.