diff options
author | hobbs <hobbs> | 2003-02-21 01:57:51 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-02-21 01:57:51 (GMT) |
commit | 2cb74285f2d3594505c682851f59449520957937 (patch) | |
tree | 30a153b6e1fc9bccd6e05a60181e4875a97b8537 /generic | |
parent | 88270da888bd830f92d6e4210abe7bdd03eeac8c (diff) | |
download | tk-2cb74285f2d3594505c682851f59449520957937.zip tk-2cb74285f2d3594505c682851f59449520957937.tar.gz tk-2cb74285f2d3594505c682851f59449520957937.tar.bz2 |
* tests/panedwindow.test:
* generic/tkPanedWindow.c (ValidSashIndex): corrected to note that
2 panes must exist before any one sash does. [tcllib Bug #689258]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkPanedWindow.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index a28f7e8..3a1fa98 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.11 2003/02/20 21:08:30 pspjuth Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.12 2003/02/21 01:57:51 hobbs Exp $ */ #include "tkPort.h" @@ -203,8 +203,12 @@ static char * ComputeSlotAddress _ANSI_ARGS_((char *recordPtr, int offset)); static int PanedWindowIdentifyCoords _ANSI_ARGS_((PanedWindow *pwPtr, Tcl_Interp *interp, int x, int y)); +/* + * Sashes are between panes only, so there is one less sash than slaves + */ + #define ValidSashIndex(pwPtr, sash) \ - (((sash) >= 0) && ((sash) < (pwPtr)->numSlaves)) + (((sash) >= 0) && ((sash) < ((pwPtr)->numSlaves-1))) static Tk_GeomMgr panedWindowMgrType = { "panedwindow", /* name */ @@ -2240,7 +2244,6 @@ MoveSash(pwPtr, sash, diff) * Growing the pane, at the expense of panes to the right. */ - /* * First check that moving the sash the requested distance will not * leave it off the screen. If necessary, clip the requested diff |