Skip to content

Commit

Permalink
simplify: remove MotionPlanningFrame::setPlanningGroupText()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Nov 29, 2018
1 parent 3ae8d9e commit 7b7a8e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ private Q_SLOTS:
void updateQueryStateHelper(robot_state::RobotState& state, const std::string& v);
void fillStateSelectionOptions();
void fillPlanningGroupOptions();
void setPlanningGroupText();
void startStateTextChangedExec(const std::string& start_state);
void goalStateTextChangedExec(const std::string& goal_state);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,6 @@ void MotionPlanningFrame::fillPlanningGroupOptions()
ui_->planning_group_combo_box->addItem(QString::fromStdString(group_name));
}

void MotionPlanningFrame::setPlanningGroupText()
{
ui_->planning_group_combo_box->setCurrentText(QString::fromStdString(planning_display_->getCurrentPlanningGroup()));
}

void MotionPlanningFrame::fillStateSelectionOptions()
{
const QSignalBlocker start_state_blocker(ui_->start_state_combo_box);
Expand Down Expand Up @@ -314,7 +309,6 @@ void MotionPlanningFrame::changePlanningGroupHelper()
if (!planning_display_->getPlanningSceneMonitor())
return;

planning_display_->addMainLoopJob(boost::bind(&MotionPlanningFrame::setPlanningGroupText, this));
planning_display_->addMainLoopJob(boost::bind(&MotionPlanningFrame::fillStateSelectionOptions, this));
planning_display_->addMainLoopJob(
boost::bind(&MotionPlanningFrame::populateConstraintsList, this, std::vector<std::string>()));
Expand All @@ -323,6 +317,7 @@ void MotionPlanningFrame::changePlanningGroupHelper()
std::string group = planning_display_->getCurrentPlanningGroup();
planning_display_->addMainLoopJob(
boost::bind(&MotionPlanningParamWidget::setGroupName, ui_->planner_param_treeview, group));
planning_display_->addMainLoopJob([=](){ui_->planning_group_combo_box->setCurrentText(QString::fromStdString(group));});

if (!group.empty() && robot_model)
{
Expand Down

0 comments on commit 7b7a8e8

Please sign in to comment.