diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index b3c180dc..669c1731 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -37,10 +37,15 @@ int CmdTags (Rules& rules, Database& database) { // Generate a unique, ordered list of tags. std::vector tags; - for (auto& interval : database.getAllIntervals ()) + for (auto& line : database.allLines ()) + { + Interval interval; + interval.initialize (line); + for (auto& tag : interval.tags ()) if (std::find (tags.begin (), tags.end (), tag) == tags.end ()) tags.push_back (tag); + } // Shows all tags. Table t;