From 506d36d74e7c18f95e6ff23dfb5f4421eb428ffd Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 25 Oct 2014 23:02:45 -0400 Subject: [PATCH] CmdBurndown - Now composes title from CLI instead of Parser. --- src/commands/CmdBurndown.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/commands/CmdBurndown.cpp b/src/commands/CmdBurndown.cpp index 18639e6f3..57f69f54c 100644 --- a/src/commands/CmdBurndown.cpp +++ b/src/commands/CmdBurndown.cpp @@ -209,23 +209,10 @@ Chart::Chart (char type) _fix_rate = 0.0; // Set the title. - _title = "("; - std::vector ::iterator i; - for (i = context.parser.tree ()->_branches.begin (); i != context.parser.tree ()->_branches.end (); ++i) - { - if (! (*i)->hasTag ("BINARY") && - ! (*i)->hasTag ("RC") && - ! (*i)->hasTag ("CONFIG") && - ! (*i)->hasTag ("CMD") && - ! (*i)->hasTag ("TERMINATOR")) - { - if (_title.length () > 1) - _title += " "; - - _title += (*i)->attribute ("raw"); - } - } - _title += ")"; + std::vector words = context.cli.getWords (); + std::string filter; + join (filter, " ", words); + _title = "(" + filter + ")"; } ////////////////////////////////////////////////////////////////////////////////