From 455dd2017c6d749e3b8bffd152f6218529dfa677 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Tue, 14 Dec 2021 13:33:54 -0500 Subject: [PATCH] If two icons are equivalent, prefer the second. --- src/lime/tools/IconHelper.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lime/tools/IconHelper.hx b/src/lime/tools/IconHelper.hx index 7233f5379..485b68189 100644 --- a/src/lime/tools/IconHelper.hx +++ b/src/lime/tools/IconHelper.hx @@ -281,7 +281,7 @@ class IconHelper for (icon in icons) { - if (icon.width == width && icon.height == height && (match == null || match.priority < icon.priority)) + if (icon.width == width && icon.height == height && (match == null || match.priority <= icon.priority)) { match = icon; } @@ -303,7 +303,7 @@ class IconHelper iconDifference = 0; } - if (iconDifference < matchDifference || iconDifference == matchDifference && icon.priority > match.priority) + if (iconDifference < matchDifference || iconDifference == matchDifference && icon.priority >= match.priority) { match = icon; matchDifference = iconDifference;