app: make sure the selected item's parent paths are all expanded

This commit is contained in:
Michael Natterer 2010-03-14 22:57:03 +01:00
parent 336de7935f
commit 9565ef44a9
1 changed files with 8 additions and 0 deletions

View File

@ -812,10 +812,18 @@ gimp_container_tree_view_select_item (GimpContainerView *view,
if (viewable && insert_data)
{
GtkTreePath *path;
GtkTreePath *parent_path;
GtkTreeIter *iter = (GtkTreeIter *) insert_data;
path = gtk_tree_model_get_path (tree_view->model, iter);
parent_path = gtk_tree_path_copy (path);
if (gtk_tree_path_up (parent_path))
gtk_tree_view_expand_to_path (tree_view->view, parent_path);
gtk_tree_path_free (parent_path);
g_signal_handlers_block_by_func (tree_view->priv->selection,
gimp_container_tree_view_selection_changed,
tree_view);