diff finch/libgnt/gnttree.c @ 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 ad49d9dace9f
children f869796bf505
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);
 	}
 }