From 15e26e23521441570d8c82ffab0ddcce49df067a Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Fri, 6 Jan 2017 10:58:07 -0500 Subject: [PATCH] Bug fix with the view not restarting properly after being cleared. --- gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs | 2 ++ gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs b/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs index 7f32909..9a25a6d 100644 --- a/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs +++ b/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs @@ -94,8 +94,10 @@ namespace OpenFaceOffline // Create new bars if necessary if (num_bars != data.Count) { + graphs = new List(); num_bars = data.Count; barGrid.Children.Clear(); + barGrid.ColumnDefinitions.Clear(); foreach (var value in data) { BarGraph newBar = new BarGraph(); diff --git a/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs b/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs index a4ece4a..519d447 100644 --- a/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs +++ b/gui/OpenFaceOffline/UI_items/MultiBarGraphHorz.xaml.cs @@ -121,6 +121,7 @@ namespace OpenFaceOffline { num_bars = data.Count; barGrid.Children.Clear(); + barGrid.RowDefinitions.Clear(); graphs.Clear(); // Make sure AUs are sorted