Message350210
I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though.
The handlescroll function is now a standalone module function in tree.py and the EditorWindow imports it for use (instead of creating its own function). Its signature is `handlescroll(event, widget=None)` where event is the event (yeah...) and widget is an optional argument that overrides the widget to call `yview(SCROLL, lines, "units")` on.
The second argument was added so that the nasty labels don't have to use the same function but with one line changed (we redirect handlescroll to use `self.canvas` because `event.widget` would refer to the Label which has no yview function).
I've added tests on handlescroll with different events. I've also added a test on multicall that checks to test if MultiCallCreator overrides yview.
Sorry about the PR closing and reopening. I was panicking about commiting more than once and saw that I should make a new branch for the patch (instead of using master branch). |
|
Date |
User |
Action |
Args |
2019-08-22 16:24:09 | GeeTransit | set | recipients:
+ GeeTransit, terry.reedy |
2019-08-22 16:24:09 | GeeTransit | set | messageid: <1566491049.15.0.568069714476.issue37902@roundup.psfhosted.org> |
2019-08-22 16:24:09 | GeeTransit | link | issue37902 messages |
2019-08-22 16:24:08 | GeeTransit | create | |
|