Merge pull request #238 from stephen-turner/CA-146815

CA-146815 Search tab does not refresh
This commit is contained in:
Gabor Apati-Nagy 2014-10-10 16:51:21 +01:00
commit e5250f1409
3 changed files with 10 additions and 4 deletions

View File

@ -52,7 +52,12 @@ namespace XenAdmin.Controls.MainWindowControls
SavedSearch, Notifications
}
private NavigationMode currentMode;
public NavigationMode currentMode
{
get;
private set;
}
private NotificationsSubMode lastNotificationsMode = NotificationsSubMode.Alerts;
#region Events
@ -295,7 +300,7 @@ namespace XenAdmin.Controls.MainWindowControls
navigationView.CurrentSearch = Search;
navigationView.NavigationMode = currentMode;
navigationView.ResetSeachBox();
navigationView.RequestRefreshTreeView();
navigationView.RefreshTreeView();
navigationView.FocusTreeView();
if (navigationView.SelectionManager.Selection.Count < 1)

View File

@ -340,7 +340,8 @@ namespace XenAdmin.Controls.MainWindowControls
TreeViewRefreshResumed();
}
private void RefreshTreeView()
// Normally you should call RequestRefreshTreeView() instead of this function
public void RefreshTreeView()
{
if (Disposing || IsDisposed || Program.Exiting)
return;

View File

@ -2609,7 +2609,7 @@ namespace XenAdmin
/// </summary>
private void UpdateHeader()
{
if (!TheTabControl.Visible)
if (navigationPane.currentMode == NavigationPane.NavigationMode.Notifications)
return;
if (SearchMode && SearchPage.Search != null)