From 89ac81be109a10f0a44b3c02a3232d87a3b56351 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Thu, 17 Jun 2010 15:52:06 +0000 Subject: [PATCH] Treat 0 the same as -1 and NULL for numeric columns such as "disc". Update issue #411 Status: Fixed Ah ha! I knew it was the disc tag - one of them had a value of 0 set, and the other had no value at all which was taken by clementine to mean "-1", which was lower than 0 so screwed up the sorting. Try now and it should be fixed (you'll have to get Clementine to rescan that directory - probably remove it from the library settings and add it again). --- src/core/song.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index f0391428c..bf8e674e3 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -536,7 +536,7 @@ void Song::MergeFromSimpleMetaBundle(const Engine::SimpleMetaBundle &bundle) { } void Song::BindToQuery(QSqlQuery *query) const { - #define intval(x) (x == -1 ? QVariant() : x) + #define intval(x) (x <= 0 ? QVariant() : x) // Remember to bind these in the same order as kBindSpec