We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a259bb commit e5a34bfCopy full SHA for e5a34bf
rviz_common/src/rviz_common/properties/property_tree_widget.cpp
@@ -117,9 +117,13 @@ void PropertyTreeWidget::setModel(PropertyTreeModel * model)
117
void PropertyTreeWidget::propertyHiddenChanged(const Property * property)
118
{
119
if (model_) {
120
- setRowHidden(
121
- property->rowNumberInParent(), model_->parentIndex(property),
122
- property->getHidden() );
+ const auto & parent_index = model_->parentIndex(property);
+ if (parent_index.isValid()) {
+ setRowHidden(property->rowNumberInParent(), parent_index, property->getHidden());
123
+ } else {
124
+ printf("Trying to hide property '%s' that is not part of the model.\n",
125
+ qPrintable(property->getName()));
126
+ }
127
}
128
129
0 commit comments