Tk Source Code

Changes On Branch tip-565
Login

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

Changes In Branch bug-3552805fff Excluding Merge-Ins

This is equivalent to a diff from 1f9de565 to e9787beb

2020-02-22
15:37
Merge implementation of TIP #565: .canvas raise/lower ignore non-existent tag, which fixes [3552805fff]. This follows a positive vote from the TCT. check-in: 72871533 user: fvogel tags: trunk
2020-02-12
15:42
Merge 8.6 check-in: b680fac4 user: jan.nijtmans tags: trunk
2020-02-11
09:12
Remove (almost all remaining) traces of DBGX for Windows build. check-in: 4a18e1fb user: jan.nijtmans tags: death-to-dbgx
2020-02-10
21:33
Fix [3552805fff]: Make '.canvas lower' work with non-exitent belowThis tag Closed-Leaf check-in: e9787beb user: fvogel tags: bug-3552805fff, tip-565
21:31
Add non-regression test canvas-2.5: CanvasWidgetCmd, raise/lower option, no error on non-existing tags check-in: 72ccddae user: fvogel tags: bug-3552805fff, tip-565
16:08
Merge trunk check-in: 420e38b9 user: jan.nijtmans tags: cplusplus
15:28
Add new (internal) function TtkGetOrientFromObj(), which uses Ttk_Orient type in stead of int. Remove various TTKAPI functions from ttkTheme.h, which are duplicates from ttkDecls.h. Add type-casts, helping C++-compatibility (but are still valid C) Fix gcc warnings, only visible using -Wextra. check-in: 1f9de565 user: jan.nijtmans tags: trunk
10:11
Merge 8.6 check-in: 4fe74f6e user: jan.nijtmans tags: trunk

Changes to generic/tkCanvas.c.
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1677
1678
1679
1680
1681
1682
1683





1684
1685
1686
1687
1688
1689
1690







-
-
-
-
-







	 */

	if (objc == 3) {
	    itemPtr = NULL;
	} else {
	    FIRST_CANVAS_ITEM_MATCHING(objv[3], &searchPtr, goto done);
	    if (itemPtr == NULL) {
		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
			"tagOrId \"%s\" doesn't match any items",
			Tcl_GetString(objv[3])));
		Tcl_SetErrorCode(interp, "TK", "CANVAS", "ITEM", NULL);
		result = TCL_ERROR;
		goto done;
	    }
	    itemPtr = itemPtr->prevPtr;
	}
	RELINK_ITEMS(objv[2], itemPtr);
	break;
    }
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1799
1800
1801
1802
1803
1804
1805





1806
1807
1808
1809
1810
1811
1812







-
-
-
-
-







	    prevPtr = canvasPtr->lastItemPtr;
	} else {
	    prevPtr = NULL;
	    FOR_EVERY_CANVAS_ITEM_MATCHING(objv[3], &searchPtr, goto done) {
		prevPtr = itemPtr;
	    }
	    if (prevPtr == NULL) {
		Tcl_SetObjResult(interp, Tcl_ObjPrintf(
			"tagOrId \"%s\" doesn't match any items",
			Tcl_GetString(objv[3])));
		Tcl_SetErrorCode(interp, "TK", "CANVAS", "ITEM", NULL);
		result = TCL_ERROR;
		goto done;
	    }
	}
	RELINK_ITEMS(objv[2], prevPtr);
	break;
    }
    case CANV_RCHARS: {
Changes to tests/canvas.test.
223
224
225
226
227
228
229










230
231
232
233
234
235
236
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246







+
+
+
+
+
+
+
+
+
+







    .c xview moveto 0.6
    update
    set x [list [.c xview]]
    .c xview scroll 2 units
    update
    lappend x [.c xview]
} -result {{0.6 0.9} {0.66 0.96}}
test canvas-2.5 {CanvasWidgetCmd, raise/lower option, no error on non-existing tags} -setup {
    .c create line 0 0 10 10 -tags aline
} -body {
    .c raise aline noline
    .c raise bline aline
    .c lower aline noline
    .c lower bline aline
} -cleanup {
    .c delete aline
} -result {}
catch {destroy .c}

# Canvas used in 3.* test cases
canvas .c -width 60 -height 40 -scrollregion {0 0 200 80} \
	-borderwidth 0 -highlightthickness 0
pack .c
update