[gtkmm] TreeView assertion "has_next" failed



Hello.
I have a custom ListViewModel where elements are inserted dynamically. First I add the element to the STL vector, then I use the following code to update the treeview.

  Gtk::TreeNodeChildren allNodes = mListModel->children();
   Gtk::TreeNodeChildren::size_type numNodes = allNodes.size();
   Gtk::TreeModel::Path path;
   path.push_back(numNodes);
   Gtk::TreeModel::iterator iter = mListModel->get_iter(path);
   mListModel->row_inserted(path, iter);

The program seems to be working fine, but when viewing the treeview I get the following error repeatedly in the console:
<snip>
Gtk-CRITICAL **: file gtktreeview.c: line 3353 (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.
</snip>
The following error i get for each row inserted.
Gtk-CRITICAL **: file gtktreeview.c: line 4177 (validate_visible_area): assertion `has_next' failed.

Does anyone have an idea what this might be?
thanks in advance
sverre sundsdal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]