[gimp/gimp-2-10] app: don't process updates when clearing container-tree-view context



commit dadfced2af663f2020f4a23244070e169b624756
Author: Ell <ell_se yahoo com>
Date:   Thu Jul 12 10:54:00 2018 -0400

    app: don't process updates when clearing container-tree-view context
    
    In GimpContainerTreeView, don't process updates in response to a
    selection-change if the selection is empty (for the reason this is
    necessary in the first place (though not in this particular case),
    see commit f9a71fb6de5a2e65e0d88c6b7aaa39f589d6cdc4.)  When
    clearing the container-view's context, we deselect all items after
    setting the context to NULL, in which case
    gimp_view_renderer_draw() warns, breaking one of our tests.

 app/widgets/gimpcontainertreeview.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index c5d55fa3ac..3093eb547b 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -1111,14 +1111,15 @@ static void
 gimp_container_tree_view_selection_changed (GtkTreeSelection      *selection,
                                             GimpContainerTreeView *tree_view)
 {
-  GimpContainerView    *view = GIMP_CONTAINER_VIEW (tree_view);
-  GList                *items;
+  GimpContainerView *view = GIMP_CONTAINER_VIEW (tree_view);
+  GList             *items;
 
   gimp_container_tree_view_get_selected (view, &items);
   gimp_container_view_multi_selected (view, items);
   g_list_free (items);
 
-  gimp_container_tree_view_process_updates (tree_view);
+  if (items)
+    gimp_container_tree_view_process_updates (tree_view);
 }
 
 static GtkCellRenderer *


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