| Ticket UUID: | 2677890 | |||
| Title: | Text widgets multi-scrolling problem | |||
| Type: | Bug | Version: | obsolete: 8.5.7 | |
| Submitter: | nobody | Created on: | 2009-03-10 08:27:33 | |
| Subsystem: | 18. [text] | Assigned To: | dkf | |
| Priority: | 8 | Severity: | ||
| Status: | Closed | Last Modified: | 2010-01-07 22:36:38 | |
| Resolution: | Fixed | Closed By: | dkf | |
| Closed on: | 2010-01-07 15:36:38 | |||
| Description: |
Hi, When running the attached code (tts.tcl), at first both text widget scroll in sync. Now click the Test button, which will re-create the text and scrollbar widgets 100 times. When complete, try scrolling again, the text widgets are no longer in sync. Now try scrolling all the way down, notice how sometimes the slider's size changes while scrolling. When at the bottom, scrolling is in sync again. Kind regards, Jos. | |||
| User Comments: |
dkf added on 2010-01-07 22:36:38:
allow_comments - 1 I think I've fixed this for 8.5 and HEAD. It was *very* difficult to construct a good test case for. The fix is to reify the number of the last line to update as soon as possible rather than blithely setting it to zero. dkf added on 2010-01-07 06:10:59: Something is making things pitch out of the iteration early; I suspect that the problem is that the insert is moving the lastMetricUpdateLine backward. The bit on line 2907 (HEAD of tkTextDisp.c) seems fishy. Some of the calcs in TextInvalidateLineMetrics seem fishy too. decosterjos added on 2009-05-08 20:47:58: This is caused by a problem in AsyncUpdateLineMetrics. The timer at the end of the function, used to continue the update, doesn't seem to expire, or the AsyncUpdateLineMetrics isn't called again after it expires. Removing the timer and replacing it by: AsyncUpdateLineMetrics(textPtr); solves the problem. decosterjos added on 2009-05-08 20:14:18: Smaller example, without multi scrolling triggering same problem:
package require Tk
proc create { } {
pack\
[text .t1 -width 10 -yscrollcommand {.sy set}]\
[ttk::scrollbar .sy -orient vertical -command {.t1 yview}]\
-side left -fill both
set txt ""
for {set i 0} {$i < 100} {incr i} {
lappend txt "$i" [list pc $i] "\n" ""
}
eval .t1 insert end $txt
}
proc mod { {idx 6.0} } {
.t1 replace $idx $idx+1c "*"
}
create
update
mod
decosterjos added on 2009-03-10 16:19:15: Bug appears in version >= 8.5, also in head. dkf added on 2009-03-10 16:16:16: Which version of Tk? decosterjos added on 2009-03-10 15:28:57: Forgot to login before submitting. nobody added on 2009-03-10 15:27:34: File Added - 317146: tts.tcl | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki