Skip to content

Commit

Permalink
Correctly reparent root frame's tree property
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jul 14, 2021
1 parent 691bc71 commit bf0df9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rviz/default_plugin/tf_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,16 @@ void TFDisplay::updateFrame(FrameInfo* frame)
}
else
{
frame->tree_property_->setParent(parent->tree_property_);
// re-parent the tree property
frame->tree_property_->getParent()->takeChild(frame->tree_property_);
parent->tree_property_->addChild(frame->tree_property_);
frame->tree_property_->setName(QString::fromStdString(frame->name_));
frame->tree_property_->setValue(QVariant());
frame->tree_property_->setDescription("");
}
}
else // otherwise reset parent_ to enter this branch again if the parent property was created
frame->parent_ = old_parent;
}

tf::StampedTransform transform;
Expand Down

0 comments on commit bf0df9a

Please sign in to comment.