From 15b456bc79a040279d645f1b630d3a6955768775 Mon Sep 17 00:00:00 2001 From: Ashton Larkin <42042756+adlarkin@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:52:30 -0400 Subject: [PATCH 1/2] Fix documentation for the Sensor component (#898) Signed-off-by: Louise Poubel --- include/ignition/gazebo/components/Sensor.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ignition/gazebo/components/Sensor.hh b/include/ignition/gazebo/components/Sensor.hh index 97ca8d74a09..2d7ddb39a35 100644 --- a/include/ignition/gazebo/components/Sensor.hh +++ b/include/ignition/gazebo/components/Sensor.hh @@ -31,7 +31,7 @@ namespace gazebo inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE { namespace components { - /// \brief A component that identifies an entity as being a link. + /// \brief A component that identifies an entity as being a sensor. using Sensor = Component; IGN_GAZEBO_REGISTER_COMPONENT("ign_gazebo_components.Sensor", Sensor) From 65c7e9a765612327886454d5b80004ee41ec87c3 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 15 Jul 2021 01:47:30 -0700 Subject: [PATCH 2/2] Fix updating GUI plugin on load (#904) Signed-off-by: Louise Poubel --- src/gui/GuiRunner.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/GuiRunner.cc b/src/gui/GuiRunner.cc index 9d7ebeb16a8..cc5c142ff3d 100644 --- a/src/gui/GuiRunner.cc +++ b/src/gui/GuiRunner.cc @@ -105,7 +105,7 @@ void GuiRunner::RequestState() ///////////////////////////////////////////////// void GuiRunner::OnPluginAdded(const QString &_objectName) { - auto plugin = gui::App()->findChild(_objectName); + auto plugin = gui::App()->PluginByName(_objectName.toStdString()); if (!plugin) { ignerr << "Failed to get plugin [" << _objectName.toStdString() @@ -113,7 +113,13 @@ void GuiRunner::OnPluginAdded(const QString &_objectName) return; } - plugin->Update(this->updateInfo, this->ecm); + auto guiSystem = dynamic_cast(plugin.get()); + + // Do nothing for pure ign-gui plugins + if (!guiSystem) + return; + + guiSystem->Update(this->updateInfo, this->ecm); } /////////////////////////////////////////////////