Skip to content

Commit 742a499

Browse files
authored
Merge pull request #1426 from tier4/fix/remove-topic-logic
Fixed logic to remove duplicate topics.
2 parents daa56f9 + 89f8752 commit 742a499

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rviz_plugins/openscenario_visualization/src/context_panel_plugin.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ void ContextPanel::updateTopicCandidates()
111111
}
112112
}
113113
}
114-
std::unique(topics_.begin(), topics_.end());
114+
115+
std::set<std::string> unique_topics(topics_.begin(), topics_.end());
116+
topics_.assign(unique_topics.begin(), unique_topics.end());
117+
115118
ui_->TopicSelect->clear();
116119
ui_->TopicSelect->addItem("simulation/context");
117120
for (const auto & topic : topics_) {

0 commit comments

Comments
 (0)