1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Merge pull request #2273 from AnyOldName3/conformant-comparator

Use irreflexive, asymmetric comparator as required by the spec.
This commit is contained in:
Chris Djali 2019-03-20 23:55:03 +00:00 committed by GitHub
commit e14682e353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,7 @@ namespace CSMPrefs
// Only activate the best match; in exact conflicts, this will favor the first shortcut added.
if (!potentials.empty())
{
std::sort(potentials.begin(), potentials.end(), ShortcutEventHandler::sort);
std::stable_sort(potentials.begin(), potentials.end(), ShortcutEventHandler::sort);
Shortcut* shortcut = potentials.front().second;
if (shortcut->getModifierStatus() && shortcut->getSecondaryMode() == Shortcut::SM_Replace)
@ -325,7 +325,7 @@ namespace CSMPrefs
if (left.first == Matches_WithMod && right.first == Matches_NoMod)
return true;
else
return left.second->getPosition() >= right.second->getPosition();
return left.second->getPosition() > right.second->getPosition();
}
void ShortcutEventHandler::widgetDestroyed()