-
Notifications
You must be signed in to change notification settings - Fork 153
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
"Fill markers" button doesn't work in "Writing a custom viewer for glue with Qt" tutorial #2388
Comments
Hi @sergiopasra, there is indeed a bug in the code given on the tutorial page. In line 132 of the code (inside the initializer for
with
The problem with the current code is that no reference to the created connection is retained, so it doesn't exist anymore when the callback property is modified. The containers that store the callback functions ( |
Thank you! Now code like this makes more sense:
So the value returned by How do I store more than one callback? Looks like |
It shouldn't really matter how they're stored - you could have a member value (of the If you end up having a decent number of connections, note that you could also use the same pattern for the layer state as for the viewer state - create a |
Describe the bug
I'm following the "Writing a custom viewer for glue with Qt" tutorial. I have copied the
TutorialViewer
classes andviewer_state.ui
. I load a csv file and I mostly obtain what is expected with one exception. The "Fill markers" toggle button does nothing. Thefill
property is never updated and the method_on_fill_change
is never called.If I add a callback to
self.checkbox
, than I can get the desired behavior, butconnect_checkable_button
is not working correctly.To Reproduce
Steps to reproduce the behavior such as:
Expected behavior
Markers on the plot are filled.
Details:
The text was updated successfully, but these errors were encountered: