Skip to content

Commit

Permalink
FlightData: Optimize string sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
mxiaogit authored and meee1 committed Jun 19, 2021
1 parent c92863b commit 9781874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2640,7 +2640,7 @@ private void hud_UserItem(object sender, EventArgs e)
}

max_length += 15;
fields.Sort((a, b) => a.Item2.CompareTo(b.Item2));
fields.Sort((a, b) => CurrentState.StringCompareTo(a.Item2, b.Item2));

int col_count = (int) (Screen.FromControl(this).Bounds.Width * 0.8f) / max_length;
int row_count = fields.Count / col_count + ((fields.Count % col_count == 0) ? 0 : 1);
Expand Down

0 comments on commit 9781874

Please sign in to comment.