[gimp] app: update GimpContainerView row expanded state ...
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: update GimpContainerView row expanded state ...
- Date: Fri, 8 Dec 2017 16:13:28 +0000 (UTC)
commit 5d544c2a175a7ce7894ac56ef6a057ca7aaa14c5
Author: Ell <ell_se yahoo com>
Date: Fri Dec 8 11:04:30 2017 -0500
app: update GimpContainerView row expanded state ...
... when inserting/reordering items
Otherwise, newly inserted/reordered group layers are always
collapsed.
app/widgets/gimpcontainertreeview.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index d7d73d5..8acd5a1 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -742,13 +742,18 @@ gimp_container_tree_view_insert_item (GimpContainerView *view,
gpointer parent_insert_data,
gint index)
{
- GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
+ GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
+ GtkTreeIter *parent_iter = parent_insert_data;
GtkTreeIter *iter;
iter = gimp_container_tree_store_insert_item (GIMP_CONTAINER_TREE_STORE (tree_view->model),
viewable,
- parent_insert_data,
+ parent_iter,
index);
+
+ if (parent_iter)
+ gimp_container_tree_view_expand_item (view, viewable, parent_iter);
+
return iter;
}
@@ -776,6 +781,7 @@ gimp_container_tree_view_reorder_item (GimpContainerView *view,
{
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
GtkTreeIter *iter = (GtkTreeIter *) insert_data;
+ GtkTreeIter parent_iter;
gboolean selected = FALSE;
if (iter)
@@ -807,6 +813,9 @@ gimp_container_tree_view_reorder_item (GimpContainerView *view,
if (selected)
gimp_container_view_select_item (view, viewable);
+
+ if (gtk_tree_model_iter_parent (tree_view->model, &parent_iter, iter))
+ gimp_container_tree_view_expand_item (view, viewable, &parent_iter);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]