mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 21:27:19 +02:00
Merge branch 'sort' into 1.9.3
This commit is contained in:
commit
9cab648d8a
1 changed files with 8 additions and 8 deletions
|
@ -604,6 +604,14 @@ bool sort_compare (int left, int right)
|
||||||
Grid::Cell* cell_left = table->mData.byRow (left, column);
|
Grid::Cell* cell_left = table->mData.byRow (left, column);
|
||||||
Grid::Cell* cell_right = table->mData.byRow (right, column);
|
Grid::Cell* cell_right = table->mData.byRow (right, column);
|
||||||
|
|
||||||
|
// Equally NULL - next column.
|
||||||
|
if (cell_left == NULL && cell_right == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Equal - next column
|
||||||
|
if (cell_left && cell_right && *cell_left == *cell_right)
|
||||||
|
continue;
|
||||||
|
|
||||||
// nothing < something.
|
// nothing < something.
|
||||||
if (cell_left == NULL && cell_right != NULL)
|
if (cell_left == NULL && cell_right != NULL)
|
||||||
return (sort_type == Table::ascendingNumeric ||
|
return (sort_type == Table::ascendingNumeric ||
|
||||||
|
@ -622,14 +630,6 @@ bool sort_compare (int left, int right)
|
||||||
sort_type == Table::ascendingDueDate ||
|
sort_type == Table::ascendingDueDate ||
|
||||||
sort_type == Table::ascendingPeriod) ? false : true;
|
sort_type == Table::ascendingPeriod) ? false : true;
|
||||||
|
|
||||||
// Equally NULL - next column.
|
|
||||||
if (cell_left == NULL && cell_right == NULL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Equal - next column
|
|
||||||
if (cell_left && cell_right && *cell_left == *cell_right)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Differing data - do a proper comparison.
|
// Differing data - do a proper comparison.
|
||||||
if (cell_left && cell_right)
|
if (cell_left && cell_right)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue