Skip to content

Commit

Permalink
Fix clear data on disconnect.
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxTes committed Apr 9, 2021
1 parent 65f488e commit 7aa45ce
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Threading;
using System.Threading.Tasks;

namespace SmartThermo.Modules.DataViewer.ViewModels.Represent
{
Expand Down Expand Up @@ -184,11 +184,8 @@ private async void GetIdGroupsSensorAsync()

private void DeviceConnector_StatusConnectChanged(object sender, StatusConnect e)
{
if (e != StatusConnect.Disconnected)
return;

ChartValues.Clear();
SensorsEtherItems.Clear();
if (e == StatusConnect.Disconnected)
SensorsEtherItems.Clear();
}

private void DeviceConnector_SettingDeviceChanged(object sender, SettingDeviceEventArgs e)
Expand Down

0 comments on commit 7aa45ce

Please sign in to comment.