Skip to content

Commit

Permalink
Fixed sorting ArmA-Studio#4
Browse files Browse the repository at this point in the history
  • Loading branch information
X39 committed Mar 25, 2017
1 parent 23d012f commit 66a7f59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ArmA.Studio/SolutionUtil/SolutionFileBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ public virtual int CompareTo(object obj)
{
if ((obj is SolutionFolder) && !(this is SolutionFolder))
{
return -1;
return 1;
}
else if (!(obj is SolutionFolder) && (this is SolutionFolder))
{
return 1;
return -1;
}
else if (obj is SolutionFileBase)
{
Expand Down
2 changes: 1 addition & 1 deletion Utility/Collections/ObservableSortedCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void Sort()
{
var it1 = (T)this.InnerList[i1];
var compRes = it0.CompareTo(it1);
if (compRes < 0)
if (compRes > 0)
{
hasChange = true;
this.InnerList[i0] = it1;
Expand Down

0 comments on commit 66a7f59

Please sign in to comment.