Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vanishing "Global Options" property when adding a RobotModelDisplay #1808

Merged

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Nov 5, 2023

With Qt 5.15, the Global Options property was vanishing, when a RobotModelDisplay was added with links having no geometry. In this case, the Alpha property of the corresponding link is hidden.
However, hiding a property:

model_->emitPropertyHiddenChanged(this);

during the process of reparenting:

child->setModel(model_);

caused setRowHidden to be called with an invalid parentIndex:

setRowHidden(property->rowNumberInParent(), model_->parentIndex(property), property->getHidden());

which then caused hiding of the corresponding top-level property.

Validity is checked in indexOf() as well.
When disabling and re-enabling a RobotModelDisplay, its hidden properties
(e.g. Alpha of a link having no geometry), were not hidden anymore.
@rhaschke rhaschke merged commit d4fbc3c into ros-visualization:noetic-devel Nov 5, 2023
6 of 7 checks passed
@rhaschke rhaschke deleted the fix-vanishing-property branch November 5, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant