Color Rules

- Corrected bug in colorizeScheduled to properly consider the scheduled date.
This commit is contained in:
Paul Beckingham 2012-05-13 18:12:33 -04:00
parent 52dfa8da1e
commit 981121799c

View file

@ -39,6 +39,7 @@ extern Context context;
static std::map <std::string, Color> gsColor;
static std::vector <std::string> gsPrecedence;
static Date now;
////////////////////////////////////////////////////////////////////////////////
void initializeColorRules ()
@ -143,7 +144,8 @@ static void colorizeActive (Task& task, const std::string& rule, Color& c)
static void colorizeScheduled (Task& task, const std::string& rule, Color& c)
{
if (gsColor[rule].nontrivial () &&
task.has ("scheduled"))
task.has ("scheduled") &&
Date (task.get_date ("scheduled")) < now)
c.blend (gsColor[rule]);
}