]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Fix district finder search result comparison 31/4231/2
authorjsimomaa <jani.simomaa@gmail.com>
Mon, 18 May 2020 10:27:12 +0000 (13:27 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 18 May 2020 10:35:59 +0000 (10:35 +0000)
gitlab #86

Change-Id: I1d6431c41d3d9cf300a6af47e1f493b5c4be9af1

org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java

index ff978059dab381aaf86d651fede0f3815613f181..6de06ff690ea23a03304e119e412309301e581c1 100644 (file)
@@ -648,7 +648,7 @@ public class ElementSelector {
                        // Select sorting direction
                        Comparator<Pair<Resource, Double>> comparator = smallest ?
                                        (p1, p2) -> Double.compare(p1.second, p2.second) :
-                                       (p1, p2) -> Double.compare(p1.second, p2.second);
+                                       (p1, p2) -> Double.compare(p2.second, p1.second);
                        
                        // Get association list to property values
                        List<Pair<Resource, Double>> result2 = elements.stream()