From 3763fef93b3c88a1f370ea6d791209f9d55fd1b1 Mon Sep 17 00:00:00 2001 From: Pierre Gergondet Date: Tue, 31 Oct 2023 18:54:49 +0900 Subject: [PATCH] [Replay] Only remove robots published by the controller --- plugins/Replay/src/Replay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Replay/src/Replay.cpp b/plugins/Replay/src/Replay.cpp index cfa84e8a38..773c54d80e 100644 --- a/plugins/Replay/src/Replay.cpp +++ b/plugins/Replay/src/Replay.cpp @@ -184,9 +184,9 @@ void Replay::reset(mc_control::MCGlobalController & gc) robots_ = mc_rbdyn::Robots::make(); // Note: we copy the output robots here not the control robots gc.robots().copy(*robots_); - gc.controller().gui()->removeCategory({"Robots"}); for(const auto & r : *robots_) { + gc.controller().gui()->removeElement({"Robots"}, r.name()); gc.controller().gui()->addElement({"Robots"}, mc_rtc::gui::Robot(r.name(), [&r]() -> const mc_rbdyn::Robot & { return r; })); }