[gimp] Bug 676940 - Group children prevent droping layer at bottom of stack
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 676940 - Group children prevent droping layer at bottom of stack
- Date: Mon, 12 Nov 2012 00:26:29 +0000 (UTC)
commit 05e12b88bc82ad5bc186a08ad367f0d989ad8ce9
Author: Michael Natterer <mitch gimp org>
Date: Mon Nov 12 01:24:58 2012 +0100
Bug 676940 - Group children prevent droping layer at bottom of stack
Treat dropping on the empty space at the bottom like dropping after
the last toplevel item.
app/widgets/gimpcontainertreeview-dnd.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview-dnd.c b/app/widgets/gimpcontainertreeview-dnd.c
index 85fa472..617ffdc 100644
--- a/app/widgets/gimpcontainertreeview-dnd.c
+++ b/app/widgets/gimpcontainertreeview-dnd.c
@@ -143,6 +143,30 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
}
}
+ else
+ {
+ GtkTreeIter iter;
+ gint n_children;
+
+ n_children = gtk_tree_model_iter_n_children (tree_view->model, NULL);
+
+ if (n_children > 0 &&
+ gtk_tree_model_iter_nth_child (tree_view->model, &iter,
+ NULL, n_children - 1))
+ {
+ GimpViewRenderer *renderer;
+
+ gtk_tree_model_get (tree_view->model, &iter,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER,
+ &renderer,
+ -1);
+
+ dest_viewable = renderer->viewable;
+ drop_pos = GTK_TREE_VIEW_DROP_AFTER;
+
+ g_object_unref (renderer);
+ }
+ }
if (dest_viewable || tree_view->priv->dnd_drop_to_empty)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]