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 // Create new bars if necessary
if (num_bars != data.Count) if (num_bars != data.Count)
{ {
graphs = new List<BarGraph>();
num_bars = data.Count; num_bars = data.Count;
barGrid.Children.Clear(); barGrid.Children.Clear();
barGrid.ColumnDefinitions.Clear();
foreach (var value in data) foreach (var value in data)
{ {
BarGraph newBar = new BarGraph(); BarGraph newBar = new BarGraph();

View file

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