Fix engine state ordering
[ardour.git] / gtk2_ardour / engine_dialog.cc
index 31738bed15cc892ca63e891026c77113020c8248..8b93cbf799eefd3b8fbfbce90ad8476d6e80a4c0 100644 (file)
@@ -1803,6 +1803,7 @@ bool EngineControl::equivalent_states (const EngineControl::State& state1,
        return false;
 }
 
+// sort active first, then most recently used to the beginning of the list
 bool
 EngineControl::state_sort_cmp (const State &a, const State &b) {
        if (a->active) {
@@ -1812,7 +1813,7 @@ EngineControl::state_sort_cmp (const State &a, const State &b) {
                return false;
        }
        else {
-               return a->lru < b->lru;
+               return a->lru > b->lru;
        }
 }