diff options
author | jenglish <jenglish@noemail.net> | 2006-12-18 19:41:19 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2006-12-18 19:41:19 (GMT) |
commit | 898da876785053e58b7f8459b9764a9b9383410f (patch) | |
tree | d718a89e145e258e8f46921451bfbf7f6cd073c7 /generic/ttk | |
parent | d89c39249db74190d4a08341f7538d1f77838329 (diff) | |
download | tk-898da876785053e58b7f8459b9764a9b9383410f.zip tk-898da876785053e58b7f8459b9764a9b9383410f.tar.gz tk-898da876785053e58b7f8459b9764a9b9383410f.tar.bz2 |
Remove assert() calls - Don't Panic
FossilOrigin-Name: 9ad473660e57329e7fc39ae19061f1719899ceac
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkTreeview.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 25f5942..a7b913d 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,11 +1,9 @@ -/* $Id: ttkTreeview.c,v 1.9 2006/12/18 19:33:13 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.10 2006/12/18 19:41:19 jenglish Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. */ -#include <assert.h> - #include <string.h> #include <tk.h> #include "ttkTheme.h" @@ -755,7 +753,7 @@ static int TreeviewInitDisplayColumns(Tcl_Interp *interp, Treeview *tv) /*------------------------------------------------------------------------ * +++ Resizing. - * Invariants: TreeWidth(tree) + slack = available space + * slack invariant: TreeWidth(tree) + slack = treeArea.width */ #define FirstColumn(tv) ((tv->tree.showFlags&SHOW_TREE) ? 0 : 1) @@ -774,10 +772,6 @@ static int TreeWidth(Treeview *tv) return width; } -static int SLACKINVARIANT(Treeview *tv) { - return (TreeWidth(tv) + tv->tree.slack == tv->tree.treeArea.width) ; -} - /* + RecomputeSlack -- */ static void RecomputeSlack(Treeview *tv) @@ -1232,7 +1226,7 @@ static int ConfigureColumn( } TtkRedisplayWidget(&tv->core); - assert(SLACKINVARIANT(tv)); + /* ASSERT: SLACKINVARIANT */ Tk_FreeSavedOptions(&savedOptions); return TCL_OK; @@ -1483,7 +1477,7 @@ static void TreeviewDoLayout(void *clientData) Ttk_LayoutNode *clientNode = Ttk_LayoutFindNode(tv->core.layout, "client"); int visibleRows; - assert(SLACKINVARIANT(tv)); + /* ASSERT: SLACKINVARIANT */ Ttk_PlaceLayout(tv->core.layout,tv->core.state,Ttk_WinBox(tv->core.tkwin)); tv->tree.treeArea = clientNode @@ -1491,7 +1485,7 @@ static void TreeviewDoLayout(void *clientData) : Ttk_WinBox(tv->core.tkwin) ; ResizeColumns(tv, tv->tree.treeArea.width); - assert(SLACKINVARIANT(tv)); + /* ASSERT: SLACKINVARIANT */ TtkScrolled(tv->tree.xscrollHandle, tv->tree.xscroll.first, @@ -2778,7 +2772,7 @@ static int TreeviewDragCommand( int right = left + c->width; if (c == column) { DragColumn(tv, i, newx - right); - assert(SLACKINVARIANT(tv)); + /* ASSERT: SLACKINVARIANT */ TtkRedisplayWidget(&tv->core); return TCL_OK; } |