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

call propertyHiddenChanged synchronously #1033

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Aug 15, 2023

Related with this PR ros-visualization/rviz#1795

Property might no longer exist when event is triggered

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde self-assigned this Aug 15, 2023
@@ -101,7 +101,7 @@ void PropertyTreeWidget::setModel(PropertyTreeModel * model)
if (model_) {
connect(
model_, SIGNAL(propertyHiddenChanged(const Property*)),
this, SLOT(propertyHiddenChanged(const Property*)), Qt::QueuedConnection);
this, SLOT(propertyHiddenChanged(const Property*)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the (rather large) caveat that I'm not super familiar with Qt's event loop, this seems like it has the same problem. That is, omitting this ends up using the "automatic" connection type from Qt: https://doc.qt.io/qt-5/qt.html#ConnectionType-enum . If the automatic connection type decides to use a queued connection, then you'll still have the same problem.

Should we instead make this a DirectConnection?

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.

2 participants