summaryrefslogtreecommitdiffstats
path: root/generic/tkTreeElem.c
diff options
context:
space:
mode:
authortreectrl <treectrl>2003-01-06 07:02:44 (GMT)
committertreectrl <treectrl>2003-01-06 07:02:44 (GMT)
commitbc5f95907ca6f638999d8ba134d16d3bee2b55e6 (patch)
treeec734aa37f399618bca40398578dfe7b4a28d34c /generic/tkTreeElem.c
parent34ec0d2303e657dedf76ba8bb9db4854fbd5a523 (diff)
downloadtktreectrl-bc5f95907ca6f638999d8ba134d16d3bee2b55e6.zip
tktreectrl-bc5f95907ca6f638999d8ba134d16d3bee2b55e6.tar.gz
tktreectrl-bc5f95907ca6f638999d8ba134d16d3bee2b55e6.tar.bz2
Fixed bug with bitmap and 'state undefine'.
Diffstat (limited to 'generic/tkTreeElem.c')
-rw-r--r--generic/tkTreeElem.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/generic/tkTreeElem.c b/generic/tkTreeElem.c
index 907b0e9..34c918a 100644
--- a/generic/tkTreeElem.c
+++ b/generic/tkTreeElem.c
@@ -330,8 +330,9 @@ static void PerStateInfo_Free(
if (pInfo->data == NULL)
return;
#ifdef DEBUG_PSI
- if (pInfo->type != typePtr) panic("PerStateInfo_Free type mismatch: got %s expected %s",
- pInfo->type ? pInfo->type->name : "NULL", typePtr->name);
+ if (pInfo->type != typePtr)
+ panic("PerStateInfo_Free type mismatch: got %s expected %s",
+ pInfo->type ? pInfo->type->name : "NULL", typePtr->name);
#endif
for (i = 0; i < pInfo->count; i++)
{
@@ -429,7 +430,9 @@ static PerStateData *PerStateInfo_ForState(
int i;
#ifdef DEBUG_PSI
- if ((pInfo->data != NULL) && (pInfo->type != typePtr)) panic("PerStateInfo_ForState type mismatch");
+ if ((pInfo->data != NULL) && (pInfo->type != typePtr))
+ panic("PerStateInfo_ForState type mismatch: got %s expected %s",
+ pInfo->type ? pInfo->type->name : "NULL", typePtr->name);
#endif
for (i = 0; i < pInfo->count; i++)
@@ -477,7 +480,9 @@ static Tcl_Obj *PerStateInfo_ObjForState(
int i;
#ifdef DEBUG_PSI
- if ((pInfo->data != NULL) && (pInfo->type != typePtr)) panic("PerStateInfo_ObjForState type mismatch");
+ if ((pInfo->data != NULL) && (pInfo->type != typePtr))
+ panic("PerStateInfo_ObjForState type mismatch: got %s expected %s",
+ pInfo->type ? pInfo->type->name : "NULL", typePtr->name);
#endif
pData = PerStateInfo_ForState(tree, typePtr, pInfo, state, match);
@@ -502,7 +507,9 @@ static void PerStateInfo_Undefine(
Tcl_Obj *configObj = pInfo->obj, *listObj, *stateObj;
#ifdef DEBUG_PSI
- if ((pInfo->data != NULL) && (pInfo->type != typePtr)) panic("PerStateInfo_Undefine type mismatch");
+ if ((pInfo->data != NULL) && (pInfo->type != typePtr))
+ panic("PerStateInfo_Undefine type mismatch: got %s expected %s",
+ pInfo->type ? pInfo->type->name : "NULL", typePtr->name);
#endif
for (i = 0; i < pInfo->count; i++)
@@ -1322,8 +1329,8 @@ static void UndefProcBitmap(ElementArgs *args)
TreeCtrl *tree = args->tree;
ElementBitmap *elemX = (ElementBitmap *) args->elem;
- PerStateInfo_Undefine(tree, &pstBitmap, &elemX->fg, args->state);
- PerStateInfo_Undefine(tree, &pstBitmap, &elemX->bg, args->state);
+ PerStateInfo_Undefine(tree, &pstColor, &elemX->fg, args->state);
+ PerStateInfo_Undefine(tree, &pstColor, &elemX->bg, args->state);
PerStateInfo_Undefine(tree, &pstBitmap, &elemX->bitmap, args->state);
}