From 4495707b888e893e0096b2c4aaf065f5e9b69e46 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Tue, 18 Apr 2017 16:12:22 +0300 Subject: [PATCH] Broken tab contribution sorting causes missing contributions refs #7147 Change-Id: I82719519e4a1bcad541e1ce45db2ff16099cd17a --- .../simantics/selectionview/ComparableTabContributor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/ComparableTabContributor.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/ComparableTabContributor.java index 8dd72accd..2077a3a87 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/ComparableTabContributor.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/ComparableTabContributor.java @@ -79,8 +79,9 @@ public class ComparableTabContributor implements PropertyTabContributor, Compara @Override public int compareTo(ComparableTabContributor o) { - double d = o.priority - priority; - return (d < 0) ? -1 : (d > 0) ? 1 : 0; + int comp = Double.compare(priority, o.priority); + if(comp != 0) return comp; + return id.compareTo(o.id); } @Override -- 2.47.1