[gimp/wip/Jehan/layers-dockable-refresh: 96/105] app: do not update the tree view editable renderer when editing.




commit b663550910804b499f2ee483b60e5533709fe52b
Author: Jehan <jehan girinstud io>
Date:   Mon Nov 15 02:28:46 2021 +0100

    app: do not update the tree view editable renderer when editing.
    
    When double-clicking the non-selected layer, the function
    gimp_view_renderer_set_border_color() was being called, which in turn
    called gimp_view_renderer_update() after some idle time.
    
    Unfortunately when this happened, the "update" handler
    gimp_container_tree_store_renderer_update() would call
    gtk_tree_model_row_changed() which triggers a focus out through GTK.
    
    One way to handle this would be to call gimp_view_renderer_update()
    directly when changing border color (no idle time), though it's actually
    more efficient to just cancel the idle function when we start editing
    the item name. It's just not necessary.

 app/widgets/gimpcontainertreeview.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index 88085cf38c..c94b5d0834 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -1149,6 +1149,7 @@ gimp_container_tree_view_name_started (GtkCellRendererText   *cell,
                           -1);
 
       real_name = gimp_object_get_name (renderer->viewable);
+      gimp_view_renderer_remove_idle (renderer);
 
       g_object_unref (renderer);
 


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