Index: generic/tkCanvas.c ================================================================== --- generic/tkCanvas.c +++ generic/tkCanvas.c @@ -1679,15 +1679,10 @@ 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); @@ -1806,15 +1801,10 @@ 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; Index: tests/canvas.test ================================================================== --- tests/canvas.test +++ tests/canvas.test @@ -225,10 +225,20 @@ 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