Skip to content

Commit

Permalink
Recereate on sensors
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>
  • Loading branch information
Nate Koenig committed Dec 7, 2021
1 parent fb20f1f commit 1b3798f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/plugins/component_inspector_editor/ModelEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "ignition/gazebo/SdfEntityCreator.hh"

#include "ignition/gazebo/gui/GuiEvents.hh"
#include "ignition/gazebo/Util.hh"

#include "ModelEditor.hh"

Expand Down Expand Up @@ -197,7 +198,8 @@ void ModelEditor::Update(const UpdateInfo &,
this->dataPtr->entityCreator->SetParent(entity, eta.parentEntity);
// Make sure to mark the parent as needing recreation. This will
// tell the server to rebuild the model with the new link.
_ecm.CreateComponent(eta.parentEntity, components::Recreate());
_ecm.CreateComponent(topLevelModel(eta.parentEntity, _ecm),
components::Recreate());
entities.push_back(entity);
}
}
Expand Down

0 comments on commit 1b3798f

Please sign in to comment.