Tk Source Code

Check-in [231587eb]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a missing scroll info update needed to make x|yview moveto|units|pages work without an update idletasks call beforehand.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-2513186fff | bug-8261c517af
Files: files | file ages | folders
SHA3-256: 231587eb856fcf6ce26b757cacc1e8a0ccf760533ccbb3d6574680b67f446b56
User & Date: fvogel 2019-04-28 10:45:38
Context
2019-04-28
12:52
Factorize the code a bit, and avoid calling the layoutProc twice when calling xview moveto|units|pages. check-in: 159f9459 user: fvogel tags: bug-2513186fff, bug-8261c517af
10:45
Add a missing scroll info update needed to make x|yview moveto|units|pages work without an update idletasks call beforehand. check-in: 231587eb user: fvogel tags: bug-2513186fff, bug-8261c517af
2019-04-27
15:55
Revert irrelevant blank changes check-in: 6ac14e0c user: fvogel tags: bug-2513186fff, bug-8261c517af
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/ttk/ttkScroll.c.

213
214
215
216
217
218
219








220
221
222
223
224
225
226
    } else if (objc == 3) {
	if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}
    } else {
	double fraction;
	int count;









	switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count)) {
	    case TK_SCROLL_ERROR:
		return TCL_ERROR;
	    case TK_SCROLL_MOVETO:
		newFirst = (int) ((fraction * s->total) + 0.5);
		break;






>
>
>
>
>
>
>
>







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    } else if (objc == 3) {
	if (Tcl_GetIntFromObj(interp, objv[2], &newFirst) != TCL_OK) {
	    return TCL_ERROR;
	}
    } else {
	double fraction;
	int count;

        /*
         * Update the scroll info (first, last, total) if needed.
         */

        if (h->corePtr->flags & REDISPLAY_PENDING) {
            h->corePtr->widgetSpec->layoutProc(h->corePtr);
        }

	switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count)) {
	    case TK_SCROLL_ERROR:
		return TCL_ERROR;
	    case TK_SCROLL_MOVETO:
		newFirst = (int) ((fraction * s->total) + 0.5);
		break;