From 7f2fecb944cdbf5a6d2e3b50e0fe42654f01d91e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 11 Dec 2019 08:12:50 +1000 Subject: [PATCH] sort due in filtered decks by ordinal, like normal review https://anki.tenderapp.com/discussions/ankidesktop/37419-card-order-of-siblings-not-preserved-in-filtered-deck#comment_47910714 --- anki/schedv2.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/anki/schedv2.py b/anki/schedv2.py index d95372a1e..60f4f404e 100644 --- a/anki/schedv2.py +++ b/anki/schedv2.py @@ -1056,14 +1056,11 @@ due = (case when odue>0 then odue else due end), odue = 0, odid = 0, usn = ? whe t = "n.id" elif o == DYN_REVADDED: t = "n.id desc" - elif o == DYN_DUE: - t = "c.due" elif o == DYN_DUEPRIORITY: t = "(case when queue=2 and due <= %d then (ivl / cast(%d-due+0.001 as real)) else 100000+due end)" % ( self.today, self.today) - else: - # if we don't understand the term, default to due order - t = "c.due" + else: # DYN_DUE or unknown + t = "c.due, c.ord" return t + " limit %d" % l def _moveToDyn(self, did, ids, start=-100000):