summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkTreeItem.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dcb54a..0a854ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-14 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkTreeItem.c (Item_Configure): on checking for -visible,
+ verify that the value actually changed, because it can be expensive.
+
2006-08-04 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tkTreeCtrl.c (TreeWidgetCmd): set the tk caret when the
diff --git a/generic/tkTreeItem.c b/generic/tkTreeItem.c
index 32faaeb..2c1c8a1 100644
--- a/generic/tkTreeItem.c
+++ b/generic/tkTreeItem.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2002-2005 Tim Baker
*
- * RCS: @(#) $Id: tkTreeItem.c,v 1.55 2006/07/11 00:07:20 treectrl Exp $
+ * RCS: @(#) $Id: tkTreeItem.c,v 1.56 2006/08/15 02:23:57 hobbs2 Exp $
*/
#include "tkTreeCtrl.h"
@@ -3686,6 +3686,7 @@ static int Item_Configure(
int error;
Tcl_Obj *errorResult = NULL;
int mask;
+ int lastVisible = item->isVisible;
for (error = 0; error <= 1; error++) {
if (error == 0) {
@@ -3720,7 +3721,7 @@ static int Item_Configure(
if (mask & ITEM_CONF_BUTTON)
Tree_InvalidateItemDInfo(tree, (TreeItem) item, NULL);
- if (mask & ITEM_CONF_VISIBLE) {
+ if ((mask & ITEM_CONF_VISIBLE) && (item->isVisible != lastVisible)) {
/* May change the width of any column */
Tree_InvalidateColumnWidth(tree, -1);