CA-286882: Check for page visibilty before calling HidePage

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2018-08-13 14:13:30 +01:00 committed by Konstantina Chremmou
parent 56a3725b36
commit 034f472163

View File

@ -3031,18 +3031,24 @@ namespace XenAdmin
switch (submodeItem.SubMode)
{
case NotificationsSubMode.Alerts:
if (updatesPage.Visible)
updatesPage.HidePage();
if (eventsPage.Visible)
eventsPage.HidePage();
alertPage.ShowPage();
updatesPage.HidePage();
eventsPage.HidePage();
break;
case NotificationsSubMode.Updates:
alertPage.HidePage();
if (alertPage.Visible)
alertPage.HidePage();
if (eventsPage.Visible)
eventsPage.HidePage();
updatesPage.ShowPage();
eventsPage.HidePage();
break;
case NotificationsSubMode.Events:
alertPage.HidePage();
updatesPage.HidePage();
if (alertPage.Visible)
alertPage.HidePage();
if (updatesPage.Visible)
updatesPage.HidePage();
eventsPage.ShowPage();
break;
}