error in GtkTreeView using GtkTreeModelFilter
- From: "Ignacio Martín" <newwen gmail com>
- To: gtk-app-devel-list gnome org
- Subject: error in GtkTreeView using GtkTreeModelFilter
- Date: Fri, 3 Mar 2006 02:36:49 +0100
Hi,
Sometimes GtkTreeView throws this error when I use a
GtkTreeModelFilter when I add a new element to the child model (a
GtkTreeStore).
Gtk-CRITICAL **: file gtktreeview.c: line 3966
(gtk_tree_view_bin_expose): assertion `has_next' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel. This generally means that the model has changed
without letting the view know. Any display from now on is likely to
be incorrect.
I don´t use threads and this is the custom simple filter function I use.
static gboolean
tree_filter_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
g_return_if_fail(model != NULL);
g_return_if_fail(iter != NULL);
gboolean ret = TRUE;
GValue is_folder = {0};
gtk_tree_model_get_value(model,iter, COL_ISFOLDER, &is_folder);
ret = g_value_get_boolean(&is_folder);
g_value_unset(&is_folder);
return ret;
}
If I return always TRUE it obviously works, but with function it
doen´t and I don´t understand why. I have seen that when I add a new
element, the parent node and the new element are filtered. But it
seems that the new element is filtered more than once.
Any help would be welcome.
Regards,
Ignacio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]