Rev 4666 of the trunk appears to fix all unwanted scrolling. Happily,
this came about through simplified code. But the work itself was far
from simple.
Please report any problems immediately.
Here is the checkin log:
QQQQQ
The third attempt at a complete scrolling bug fix. Apparently
successful with simplified code.
1. Removed virtually all calls to w.see. It causes great mischief.
Imo, the calls to w.see, especially in v.restoreCursorAndScroll,
and leoBody/qtBody.selectEditorHelper were the source of most,
if not all, of unwanted scrolls.
2. The two sections << restore the selection, insertion point and the
scrollbar >>
in leoBody/qtBody.selectEditorHelper now do *not* restore any
scrollbar position.
Apparently the removed logic interfered with
v.restoreCursorAndScroll.
The simplified code seems to work well enough with multiple body
editors.
3. Discovered a [Qt] bug in w.verticalScrollBar().sliderPosition():
The scrollbar position returned from sb.sliderPosition is valid
only if cursor is visible!
Otherwise the *reported* position will be such that the cursor
*is* visible.
This is *not* the source of the main bug, but it means that if the
user manually
sets the scrollbar and then immediately selects another node, Leo
will
not restore the scrollbar position properly when the user returns
to the node.
4. Simplified the interface between set/getYScrollPosition.
The getter now returns a single int, instead of a tuple, and this
is eventually passed back to the setter.
All unit tests pass, as do hand tests, including tests of Viktor's
test-leo-rev-4506.leo.
QQQQQ
Edward
--
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.