Commit 23b54570 authored by Johannes Schmid's avatar Johannes Schmid
Browse files

project-model: Don't be picky about non-existing children

It is sometimes possible that children are added before their parents in the tree. We simply
ignore that for now as it doesn't cause any harm in the tree model.
parent 9eaad35d
2010-11-12 Johannes Schmid <jhs@gnome.org>
* gladeui/glade-project.c:
project-model: Don't be picky about non-existing children
It is sometimes possible that children are added before their parents
in the tree. We simply ignore that for now as it doesn't
cause any harm in the tree model.
2010-10-12 Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
Implemented preview feature for Glade.
......
......@@ -4635,11 +4635,13 @@ glade_project_model_get_path (GtkTreeModel* model,
{
GList* children = glade_widget_get_children (parent);
GList* child = g_list_find (children, glade_widget_get_object (widget));
g_assert (child != NULL);
gtk_tree_path_prepend_index (path,
g_list_position (children, child));
if (!child)
gtk_tree_path_prepend_index (path,
0);
else
gtk_tree_path_prepend_index (path,
g_list_position (children, child));
g_list_free (children);
widget = parent;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment