You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elseif (geometry_->type == urdf::Geometry::MESH)
{
[..]
if (name == "Scale")
{
//Remaining sub-properties are for Mesh
QList<QtProperty *> sub_items = top_item_ ->subProperties()[2]->subProperties();
[..]
}
}
The assumption here is that mesh sub properties are always at index 3, which is not under this applications control, and may thus change at any time.
At a minimum, the magic number (2) should be removed and a named constant used. Ideally -- if possible -- the sub properties of top_item_ should be searched for the Mesh properties, and that index should be used.
The text was updated successfully, but these errors were encountered:
Example:
LinkGeometryProperty::loadData()
(here):The assumption here is that
mesh
sub properties are always at index3
, which is not under this applications control, and may thus change at any time.At a minimum, the magic number (
2
) should be removed and a named constant used. Ideally -- if possible -- the sub properties oftop_item_
should be searched for theMesh
properties, and that index should be used.The text was updated successfully, but these errors were encountered: