Skip to content

Commit

Permalink
Fixes #89: Bring back ordering of the currently selected column. Addi…
Browse files Browse the repository at this point in the history
…tionally if no order is selected BuildOrder is used as defaultvalue.
  • Loading branch information
StefanKert committed Jul 17, 2020
1 parent 7b2f52a commit 1b9d837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/BuildVision.UI/ViewModels/BuildVisionPaneViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ public BuildVisionPaneViewModel(
GroupedProjectsList.IsLiveGrouping = true;
GroupedProjectsList.IsLiveSorting = true;

_buildInformationProvider.BuildStateChanged += () => { };
_buildInformationProvider.BuildStateChanged += () =>
{
GroupedProjectsList.Refresh();
};

_settingsProvider = settingsProvider;
_settingsProvider.SettingsChanged += () =>
Expand Down
4 changes: 2 additions & 2 deletions src/BuildVision.UI/ViewModels/SortOrderFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class SortOrderFactory
public static ProjectItemColumnSorter GetProjectItemSorter(SortDescription sortDescription)
{
var sortOrder = sortDescription.Order;
string sortPropertyName = sortDescription.Property;
var sortPropertyName = sortDescription.Property;
if (sortOrder != SortOrder.None && !string.IsNullOrEmpty(sortPropertyName))
{
ListSortDirection? sortDirection = sortOrder.ToSystem();
Expand Down Expand Up @@ -69,7 +69,7 @@ public static ProjectItemColumnSorter GetProjectItemSorter(SortDescription sortD
return new ProjectItemColumnSorter(sortDirection.Value, prop => prop.WarningsCount);
}
}
return null;
return new ProjectItemColumnSorter(ListSortDirection.Ascending, prop => prop.BuildOrder);
}
}
}

0 comments on commit 1b9d837

Please sign in to comment.