From bc5f95907ca6f638999d8ba134d16d3bee2b55e6 Mon Sep 17 00:00:00 2001 From: treectrl Date: Mon, 6 Jan 2003 07:02:44 +0000 Subject: Fixed bug with bitmap and 'state undefine'. --- generic/tkTreeElem.c | 21 ++++++++++++++------- 1 file 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); } -- cgit v0.12