From 990eb1d6934473f63e6736b1a9b386feddad3351 Mon Sep 17 00:00:00 2001 From: Benjamin Perseghetti Date: Sat, 18 May 2024 15:07:54 -0400 Subject: [PATCH] Update src/gui/plugins/modules/EntityContextMenu.cc Co-authored-by: Jenn Nguyen Signed-off-by: Benjamin Perseghetti --- src/gui/plugins/modules/EntityContextMenu.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gui/plugins/modules/EntityContextMenu.cc b/src/gui/plugins/modules/EntityContextMenu.cc index ef7637489b..6af4435972 100644 --- a/src/gui/plugins/modules/EntityContextMenu.cc +++ b/src/gui/plugins/modules/EntityContextMenu.cc @@ -104,18 +104,14 @@ using namespace sim; void EntityContextMenu::OnCurrentlyTrackedSub(const msgs::CameraTrack &_msg) { std::lock_guard lock(this->dataPtr->mutex); + this->dataPtr->followingTarget = false; if (_msg.track_mode() == gz::msgs::CameraTrack::FOLLOW || _msg.track_mode() == gz::msgs::CameraTrack::FOLLOW_LOOK_AT || _msg.track_mode() == gz::msgs::CameraTrack::FOLLOW_FREE_LOOK) { this->dataPtr->followingTarget = true; - this->FollowingTargetChanged(); } - else - { - this->dataPtr->followingTarget = false; this->FollowingTargetChanged(); - } return; }