[gimp/wip/Jehan/layers-dockable-refresh: 28/74] app: fix coordinate conversion.




commit 9b4c59a19fe2d0563e619ca9aa44bbeec66c89a4
Author: Jehan <jehan girinstud io>
Date:   Tue Apr 6 23:17:14 2021 +0200

    app: fix coordinate conversion.
    
    I was doing it the wrong way, and it became impossible to drop layers
    into a layer folder (unless it already had some layers in it).

 app/widgets/gimpcontainertreeview-dnd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview-dnd.c b/app/widgets/gimpcontainertreeview-dnd.c
index da073f27a6..e961bcb915 100644
--- a/app/widgets/gimpcontainertreeview-dnd.c
+++ b/app/widgets/gimpcontainertreeview-dnd.c
@@ -235,6 +235,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView    *tree_view,
       break;
     }
 
+  gtk_tree_view_convert_widget_to_bin_window_coords (tree_view->view, x, y, &x, &y);
   if (gtk_tree_view_get_path_at_pos (tree_view->view, x, y,
                                      &drop_path, NULL, NULL, NULL))
     {
@@ -253,9 +254,6 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView    *tree_view,
       g_object_unref (renderer);
 
       gtk_tree_view_get_cell_area (tree_view->view, drop_path, NULL, &cell_area);
-      gtk_tree_view_convert_bin_window_to_widget_coords (tree_view->view,
-                                                         cell_area.x, cell_area.y, &cell_area.x, 
&cell_area.y);
-
 
       if (gimp_viewable_get_children (dest_viewable))
         {


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