From 815822e0039e23c47dc23cebea767be70ea3d0d6 Mon Sep 17 00:00:00 2001 From: Sharath Babu Date: Mon, 25 Jul 2016 12:56:29 +0530 Subject: [PATCH] CA-213499: List view of snapshots not working as expected with VMSS vmss snapshots are shown even when Scheduled snapshots is unchecked in same menu. Signed-off-by: Sharath Babu --- XenAdmin/TabPages/SnapshotsPage.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/XenAdmin/TabPages/SnapshotsPage.cs b/XenAdmin/TabPages/SnapshotsPage.cs index 9e6557909..8bf746afb 100644 --- a/XenAdmin/TabPages/SnapshotsPage.cs +++ b/XenAdmin/TabPages/SnapshotsPage.cs @@ -426,16 +426,7 @@ namespace XenAdmin.TabPages for (int i = 0; i < snapshots.Count; i++) { VM snapshot = snapshots[i]; - if (!(snapshot.is_snapshot_from_vmpp && !toolStripMenuItemScheduledSnapshots.Checked)) - { - snapshot.PropertyChanged -= snapshot_PropertyChanged; - snapshot.PropertyChanged += snapshot_PropertyChanged; - //Build DataGridView - SnapshotDataGridViewRow row = new SnapshotDataGridViewRow(snapshot); - row.Tag = snapshot; - DataGridView.Rows.Add(row); - } - else if (!(snapshot.is_vmss_snapshot && !toolStripMenuItemScheduledSnapshots.Checked)) + if (!(snapshot.is_snapshot_from_vmpp || snapshot.is_vmss_snapshot) || toolStripMenuItemScheduledSnapshots.Checked) { snapshot.PropertyChanged -= snapshot_PropertyChanged; snapshot.PropertyChanged += snapshot_PropertyChanged; @@ -444,6 +435,7 @@ namespace XenAdmin.TabPages row.Tag = snapshot; DataGridView.Rows.Add(row); } + VM parent = VM.Connection.Resolve(snapshot.parent); if (parent == null) roots.Add(snapshot);