mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
CA-197622: Fixed exception "Unable to sort because the IComparer.Compare() method returns inconsistent results"
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
12700a638a
commit
ac5eda5812
@ -768,10 +768,7 @@ namespace XenAdmin.Controls.CustomDataGraph
|
||||
if (Uuid == other.Uuid)
|
||||
return 0;
|
||||
|
||||
double disp1 = DisplayArea;
|
||||
double disp2 = other.DisplayArea;
|
||||
//attempt some sort of hysteresis type thing to prevent graphs swapping too frequently
|
||||
int comp = disp1 == disp2 ? 0 : disp1 * 1.1 < disp2 ? -1 : disp1 / 1.1 > disp2 ? 1 : 0;
|
||||
int comp = DisplayArea.CompareTo(other.DisplayArea);
|
||||
if (comp == 0)
|
||||
return StringUtility.NaturalCompare(Name, other.Name);
|
||||
return comp;
|
||||
|
Loading…
Reference in New Issue
Block a user