Skip to content

Commit

Permalink
Fix joint controller GUI test (#697)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina authored Mar 19, 2021
1 parent f9a5ece commit 778ff85
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace ignition::gazebo::gui
public: Entity modelEntity{kNullEntity};

/// \brief Name of the model
public: QString modelName;
public: QString modelName{"No model selected"};

/// \brief Whether currently locked on a given entity
public: bool locked{false};
Expand All @@ -58,7 +58,7 @@ namespace ignition::gazebo::gui
public: transport::Node node;

/// \brief Whether the initial model set from XML has been setup.
public: bool xmlModelInitialized{false};
public: bool xmlModelInitialized{true};
};
}

Expand Down Expand Up @@ -157,12 +157,11 @@ void JointPositionController::LoadConfig(
if (auto elem = _pluginElem->FirstChildElement("model_name"))
{
this->dataPtr->modelName = QString::fromStdString(elem->GetText());
// If model name isn't set, initialization is not complete yet.
this->dataPtr->xmlModelInitialized = false;
}
}

// If model name isn't set, initialization is complete.
this->dataPtr->xmlModelInitialized = this->dataPtr->modelName.isEmpty();

ignition::gui::App()->findChild<
ignition::gui::MainWindow *>()->installEventFilter(this);

Expand Down

0 comments on commit 778ff85

Please sign in to comment.