From 1d7d97e47ee33fc3cd6daceea6ced3a3126c2b8c Mon Sep 17 00:00:00 2001 From: ericm Date: Mon, 17 Apr 2000 17:40:27 +0000 Subject: * generic/tkGrid.c: Fixed bogus logic in [grid propagate] that caused [grid propagate . 0] to act as a toggle instead of an absolute set. [Bug: 2286]. FossilOrigin-Name: ec09b433589210b48622eccf572121e228755d3f --- generic/tkGrid.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 6f84fc9..ca74265 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkGrid.c,v 1.8 2000/04/08 06:59:19 hobbs Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.9 2000/04/17 17:40:27 ericm Exp $ */ #include "tkInt.h" @@ -575,8 +575,15 @@ Tk_GridCmd(clientData, interp, argc, argv) if (Tcl_GetBoolean(interp, argv[3], &propagate) != TCL_OK) { return TCL_ERROR; } + + /* Only request a relayout if the propagation bit changes */ + if ((!propagate) ^ (masterPtr->flags&DONT_PROPAGATE)) { - masterPtr->flags ^= DONT_PROPAGATE; + if (propagate) { + masterPtr->flags &= ~DONT_PROPAGATE; + } else { + masterPtr->flags |= DONT_PROPAGATE; + } /* * Re-arrange the master to allow new geometry information to -- cgit v0.12