Bug fix with the view not restarting properly after being cleared.

This commit is contained in:
Tadas Baltrusaitis 2017-01-06 10:58:07 -05:00
parent bb382043ee
commit 15e26e2352
2 changed files with 3 additions and 0 deletions

View File

@ -94,8 +94,10 @@ namespace OpenFaceOffline
// Create new bars if necessary
if (num_bars != data.Count)
{
graphs = new List<BarGraph>();
num_bars = data.Count;
barGrid.Children.Clear();
barGrid.ColumnDefinitions.Clear();
foreach (var value in data)
{
BarGraph newBar = new BarGraph();

View File

@ -121,6 +121,7 @@ namespace OpenFaceOffline
{
num_bars = data.Count;
barGrid.Children.Clear();
barGrid.RowDefinitions.Clear();
graphs.Clear();
// Make sure AUs are sorted