From 981121799ca6aa71bdad0fa6a61117d4bba6f1a8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 13 May 2012 18:12:33 -0400 Subject: [PATCH] Color Rules - Corrected bug in colorizeScheduled to properly consider the scheduled date. --- src/rules.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rules.cpp b/src/rules.cpp index b8654ca43..5b2493819 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -39,6 +39,7 @@ extern Context context; static std::map gsColor; static std::vector 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]); }