Re: GtkTreeView, GtkListStore and more...
- From: Iago Rubio <iago iagorubio com>
- To: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView, GtkListStore and more...
- Date: Thu, 17 Aug 2006 18:14:02 +0200
On Thu, 2006-08-17 at 17:43 +0200, Fernando ApesteguÃa wrote:
for(....){
...
if(should_be_deleted)
gtk_list_store_remove(model,&iter);
....
gtk_tree_model_iter_next(GTK_TREE_MODEL(model),&iter);
}
Try:
if(should_be_deleted)
gtk_list_store_remove(model, &iter);
else
gtk_tree_model_iter_next(GTK_TREE_MODEL(model),&iter);
gtk_list_store_remove() updates the iter to point to the next element,
so you should call gtk_tree_model_iter_next if the list item have not
been deleted. Otherwise you're moving the iter twice - one on remove,
second on gtk_tree_model_iter_next.
Cheers.
--
Iago Rubio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]