Skip to content

BUG: Lost functionality of interactive selector update #20618

Closed

Description

@larsoner

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)

Activity

  1. added this to the v3.5.0 milestone on Jul 9, 2021
  2. added
    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
    on Jul 9, 2021
  3. jklymak commented on Jul 9, 2021

    @jklymak
    Member

    @ericpre @timhoffm any suggestions here? Thanks!

  4. ericpre commented on Jul 10, 2021

    @ericpre
    Member

    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?

  5. QuLogic commented on Jul 20, 2021

    @QuLogic
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.topic: widgets/UI

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions