changeset 21271:ca16de222b76

Do not do unnecessary processing when updating text in a column.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 30 Oct 2007 09:17:50 +0000
parents 133a8614a41e
children f869796bf505
files finch/libgnt/gnttree.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gnttree.c	Sun Oct 28 17:17:56 2007 +0000
+++ b/finch/libgnt/gnttree.c	Tue Oct 30 09:17:50 2007 +0000
@@ -1492,7 +1492,8 @@
 			col->text = g_strdup(text ? text : "");
 		}
 
-		if (get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) >= 0)
+		if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(tree), GNT_WIDGET_MAPPED) &&
+			get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) >= 0)
 			redraw_tree(tree);
 	}
 }