From 80a31960974ac344963efdafaeecf6f632aa1cc9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 6 Oct 2009 10:12:07 -0400 Subject: [PATCH] Bug Fix - color.alternate ignoring color/forcecolor overrides - Fixed bug that caused the alternate line coloration to ignore whether color was enabled or not. This (once again) added color codes to the shadow file. This happens repeatedly - I think a unit test for this mistake is needed. --- src/custom.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/custom.cpp b/src/custom.cpp index 8b76c5317..b2c2ae6f4 100644 --- a/src/custom.cpp +++ b/src/custom.cpp @@ -530,9 +530,12 @@ int runCustomReport ( } // If an alternating row color is specified, notify the table. - Color alternate (context.config.get ("color.alternate", "")); - if (alternate.nontrivial ()) - table.setTableAlternateColor (alternate); + if (context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false)) + { + Color alternate (context.config.get ("color.alternate", "")); + if (alternate.nontrivial ()) + table.setTableAlternateColor (alternate); + } // Limit the number of rows according to the report definition. int maximum = context.config.get (std::string ("report.") + report + ".limit", (int)0);