Bug Fix = #317, sorting

- Fixed bug #317 which colored tasks in the 'completed' report according to
  due dates, which are no longer relevant to a completed task (thanks to
  Cory Donnelly).
- Fixed bug that was causing the 'completed' report to sort incorrectly.
This commit is contained in:
Paul Beckingham
2009-11-29 08:21:33 -05:00
parent b5f65850f8
commit 8d784da0ae
4 changed files with 20 additions and 9 deletions

View File

@@ -91,6 +91,8 @@ void autoColorize (
// Note: fg, bg already contain colors specifically assigned via command.
// Note: These rules form a hierarchy - the last rule is King.
Task::status status = task.getStatus ();
// Colorization of the tagged.
if (gsFg["color.tagged"] != Text::nocolor ||
gsBg["color.tagged"] != Text::nocolor)
@@ -146,9 +148,11 @@ void autoColorize (
}
}
// Colorization of the active.
if (gsFg["color.active"] != Text::nocolor ||
gsBg["color.active"] != Text::nocolor)
// Colorization of the active, if not completed/deleted.
if ((gsFg["color.active"] != Text::nocolor ||
gsBg["color.active"] != Text::nocolor) &&
status != Task::completed &&
status != Task::deleted)
{
if (task.has ("start"))
{
@@ -202,7 +206,9 @@ void autoColorize (
}
// Colorization of the due and overdue.
if (task.has ("due"))
if (task.has ("due") &&
status != Task::completed &&
status != Task::deleted)
{
std::string due = task.get ("due");
switch (getDueState (due))