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) 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); } /////////////////////////////////////////////////