Repository navigation
Conversation
in two places `super` needs to be used in the Qt5 case and frustrated in the Qt4 case. These are handled by the two `_fake_super_*` methods. The must be just private as we need to override in sub-classes. Closes matplotlib#9040
|
Would the patch at https://github.com/matplotlib/matplotlib/pull/8771/files#diff-76b5bbaa0c6a702660db7feae68c1d20 (starting at "Work around lack of cooperative inheritance") solve the issue too? |
|
I am not sure if I am more comfortable with this approach or via re-implementing the MRO innards. |
|
If we only need to fix this for these classes, I say go with @tacaswell because there's less introspection going on (we've codified the special case in comments and the inheritance structure). If we get to the point where we have lots of classes dealing with this nonsense, then I'd say the complexity of the solution in #8771 is warranted. |
| # Note different super-calling style to backend_qt5 | ||
| QtWidgets.QWidget.__init__(self) | ||
| FigureCanvasBase.__init__(self, figure) | ||
| self.figure = figure |
There was a problem hiding this comment.
Why'd all this other stuff, like setMouseTracking go away?
There was a problem hiding this comment.
Because that stuff is handled in the FigureCanvasQt5 init and this function injected in.
|
I think @tacaswell should just decide whether we want to try to get #8771 in any time soon or not, and decide accordingly for this PR. |
|
Not knowing the state of #8771, I'm not sure if it's good to merge something so large towards the end of the 2.1 release cycle, whereas this particular issue is probably a showstopper for 2.1. |
|
See #9052 for the alternate approach, without the cairo parts which are irrelevant for this. |
|
I confirm that this solves the problem with #9040 |
in two places
superneeds to be used in the Qt5 case andfrustrated in the Qt4 case. These are handled by the two
_fake_super_*methods. The must be just private as we need tooverride in sub-classes.
Closes #9040