Skip to content

Commit

Permalink
correctly handle multiple instances of the same command on a slide
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Feb 15, 2013
1 parent fe823cb commit 3b0cb96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cpp/session/modules/presentation/SlideParser.cpp
Expand Up @@ -120,12 +120,10 @@ bool Slide::showTitle() const
std::vector<Command> Slide::commands() const
{
std::vector<Command> commands;
std::vector<std::string> flds = fields();
for (size_t i=0; i<flds.size(); i++)
BOOST_FOREACH(const Slide::Field& field, fields_)
{
std::string field = flds[i];
if (isCommandField(field))
commands.push_back(Command(field, fieldValue(field)));
if (isCommandField(field.first))
commands.push_back(Command(field.first, field.second));
}
return commands;
}
Expand Down

0 comments on commit 3b0cb96

Please sign in to comment.