Skip to content

BUG: Lost functionality of interactive selector update #20618

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

Closed
larsoner opened this issue Jul 9, 2021 · 3 comments · Fixed by #20693
Closed

BUG: Lost functionality of interactive selector update #20618

larsoner opened this issue Jul 9, 2021 · 3 comments · Fixed by #20693
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: widgets/UI
Milestone

Comments

@larsoner
Copy link
Contributor

larsoner commented Jul 9, 2021

In MNE we allow users to update the selector colors, and have:

        selector.rect.set_color(color)
        selector.rectprops.update(dict(facecolor=color))

This now emits a deprecation warning from #20113, but it doesn't indicate how code should be migrated. I looked at this and #20558 and hoped / thought maybe I could find some selector.set_* or selector.handle_props or something to modify but I don't see anything. How should we update our code? (And it might be worth improving the deprecation warning to give some hints to anyone else who hits this issue.) Maybe with something like this?

selector.artists[0].set_color(color)

the artists[0] is the selector.rect. But this just seems like a hack workaround, and if there are properties held internally it will not "stick" so I'm guessing it's not the right idea...

Originally posted by @larsoner in #20113 (comment)

@jklymak jklymak added this to the v3.5.0 milestone Jul 9, 2021
@jklymak jklymak added topic: widgets/UI Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labels Jul 9, 2021
@jklymak
Copy link
Member

jklymak commented Jul 9, 2021

@ericpre @timhoffm any suggestions here? Thanks!

@ericpre
Copy link
Member

ericpre commented Jul 10, 2021

I would lean toward having something along the line of selector.set_props and selector.set_handle_props for all selectors. Should it be done as part as part of #20585, where there is a discussion about renaming corresponding parameters?

@QuLogic
Copy link
Member

QuLogic commented Jul 20, 2021

Well, since that's merged, it'll have to be a new PR, but yes, I expect it should be some .set_* methods, and not accessing the child artists directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: widgets/UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants