Skip to content

Commit

Permalink
Merge branch 'ign-gazebo3' into wagnermarcos/CLI_model_info_dump
Browse files Browse the repository at this point in the history
  • Loading branch information
chapulina authored Jul 16, 2021
2 parents 999dd1f + 65c7e9a commit 084ead9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ignition/gazebo/components/Sensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<NoData, class SensorTag>;
IGN_GAZEBO_REGISTER_COMPONENT("ign_gazebo_components.Sensor", Sensor)

Expand Down
10 changes: 8 additions & 2 deletions src/gui/GuiRunner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,21 @@ void GuiRunner::RequestState()
/////////////////////////////////////////////////
void GuiRunner::OnPluginAdded(const QString &_objectName)
{
auto plugin = gui::App()->findChild<GuiSystem *>(_objectName);
auto plugin = gui::App()->PluginByName(_objectName.toStdString());
if (!plugin)
{
ignerr << "Failed to get plugin [" << _objectName.toStdString()
<< "]" << std::endl;
return;
}

plugin->Update(this->updateInfo, this->ecm);
auto guiSystem = dynamic_cast<GuiSystem *>(plugin.get());

// Do nothing for pure ign-gui plugins
if (!guiSystem)
return;

guiSystem->Update(this->updateInfo, this->ecm);
}

/////////////////////////////////////////////////
Expand Down

0 comments on commit 084ead9

Please sign in to comment.