I've been trying to get to grips with Leo's ongoing scroll position / restoration issues.
[F.S. - if you could test the change below with @bool maintain_scroll = True somewhere in your settings with rev. 5421 either from bzr or http://www.greygreen.org/leo/ tomorrow] LeoPyRef.leo#Code-->Qt gui-->@file ../plugins/qtGui.py--> << define text widget classes >>--> << define leoQTextEditWidget class >>-->Widget-specific overrides (leoQTextEditWidget)-->getYScrollPosition >>(leoQTextEditWidget) Claims that Qt reports the wrong scroll position when the cursor is not visible. I'm not convinced. This probe code: def sp(): print c.frame.body.bodyCtrl.getYScrollPosition(), \ c.frame.body.bodyCtrl.widget.verticalScrollBar().sliderPosition() if not hasattr(g, '_sp'): g._sp = sp g.registerHandler('idle', lambda a,b:g._sp()) g._sp = sp seems to report sensible scroll position information all the time, whether adjusted by dragging the scroll bar, mouse wheel rolling, entering text, etc. I think doubting getYScrollPosition() has led to use of ensureCursorVisible() more than it should be. I've added a maintain_scroll bool @setting to suppress a couple of calls to ensureCursorVisible() in odd places which caused body text to jump to the cursor position when focus moved in and out of the Leo window. This scratched an itch for me, the body text moving when I was trying to read it against some other text like API docs. in a browser. I'm not sure if it's impacted body text jump bug. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
